[{"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nاعثر على أنواع السياسات التي يستخدمها أكثر من 4 عملاء. عرض رمز أنواعها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID INTEGER NOT NULL ,\\naddress_details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL ,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID INTEGER NOT NULL,\\nProduct_Type_Code CHAR(15),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Parties': 'CREATE TABLE Parties (\\nParty_ID INTEGER NOT NULL,\\nParty_Details VARCHAR(255),\\nPRIMARY KEY (Party_ID)\\n)', 'Assets': 'CREATE TABLE Assets (\\nAsset_ID INTEGER NOT NULL ,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Asset_ID)\\n)', 'Channels': 'CREATE TABLE Channels (\\nChannel_ID INTEGER NOT NULL ,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Channel_ID)\\n)', 'Finances': 'CREATE TABLE Finances (\\nFinance_ID INTEGER NOT NULL ,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Finance_ID)\\n)', 'Events': 'CREATE TABLE Events (\\nEvent_ID INTEGER NOT NULL ,\\nAddress_ID INTEGER,\\nChannel_ID INTEGER NOT NULL,\\nEvent_Type_Code CHAR(15),\\nFinance_ID INTEGER NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nPRIMARY KEY (Event_ID),\\nUNIQUE (Event_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Finance_ID) REFERENCES Finances (Finance_ID)\\n)', 'Products_in_Events': 'CREATE TABLE Products_in_Events (\\nProduct_in_Event_ID INTEGER NOT NULL,\\nEvent_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Product_in_Event_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Parties_in_Events': 'CREATE TABLE Parties_in_Events (\\nParty_ID INTEGER NOT NULL,\\nEvent_ID INTEGER NOT NULL,\\nRole_Code CHAR(15),\\nPRIMARY KEY (Party_ID, Event_ID),\\nFOREIGN KEY (Party_ID) REFERENCES Parties (Party_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID)\\n)', 'Agreements': 'CREATE TABLE Agreements (\\nDocument_ID INTEGER NOT NULL ,\\nEvent_ID INTEGER NOT NULL,\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID)\\n)', 'Assets_in_Events': 'CREATE TABLE Assets_in_Events (\\nAsset_ID INTEGER NOT NULL,\\nEvent_ID INTEGER NOT NULL,\\nPRIMARY KEY (Asset_ID, Event_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء وأكواد أنواع المنتجات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Product_Name FROM Products ORDER BY Product_Price ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أسماء العملاء الذين لم يطلبوا أبدًا المنتج لاتيه.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_name FROM customers WHERE payment_method != 'Cash'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Third_Party_Companies': 'CREATE TABLE `Third_Party_Companies` (\\n`company_id` INTEGER PRIMARY KEY ,\\n`company_type` VARCHAR(5) NOT NULL,\\n`company_name` VARCHAR(255),\\n`company_address` VARCHAR(255),\\n`other_company_details` VARCHAR(255)\\n)', 'Maintenance_Contracts': 'CREATE TABLE `Maintenance_Contracts` (\\n`maintenance_contract_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_company_id` INTEGER NOT NULL,\\n`contract_start_date` DATETIME,\\n`contract_end_date` DATETIME,\\n`other_contract_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Parts': 'CREATE TABLE `Parts` (\\n`part_id` INTEGER PRIMARY KEY,\\n`part_name` VARCHAR(255),\\n`chargeable_yn` VARCHAR(1),\\n`chargeable_amount` VARCHAR(20),\\n`other_part_details` VARCHAR(255)\\n)', 'Skills': 'CREATE TABLE `Skills` (\\n`skill_id` INTEGER PRIMARY KEY,\\n`skill_code` VARCHAR(20),\\n`skill_description` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_name` VARCHAR(255),\\n`gender` VARCHAR(1),\\n`other_staff_details` VARCHAR(255)\\n)', 'Assets': 'CREATE TABLE `Assets` (\\n`asset_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_id` INTEGER NOT NULL,\\n`supplier_company_id` INTEGER NOT NULL,\\n`asset_details` VARCHAR(255),\\n`asset_make` VARCHAR(20),\\n`asset_model` VARCHAR(20),\\n`asset_acquired_date` DATETIME,\\n`asset_disposed_date` DATETIME,\\n`other_asset_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_id` )\\nREFERENCES `Maintenance_Contracts`(`maintenance_contract_id` ),\\nFOREIGN KEY (`supplier_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Asset_Parts': 'CREATE TABLE `Asset_Parts` (\\n`asset_id` INTEGER NOT NULL,\\n`part_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` ),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` )\\n)', 'Maintenance_Engineers': 'CREATE TABLE `Maintenance_Engineers` (\\n`engineer_id` INTEGER PRIMARY KEY,\\n`company_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(50),\\n`last_name` VARCHAR(50),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Engineer_Skills': 'CREATE TABLE `Engineer_Skills` (\\n`engineer_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)', 'Fault_Log': 'CREATE TABLE `Fault_Log` (\\n`fault_log_entry_id` INTEGER PRIMARY KEY,\\n`asset_id` INTEGER NOT NULL,\\n`recorded_by_staff_id` INTEGER NOT NULL,\\n`fault_log_entry_datetime` DATETIME,\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` ),\\nFOREIGN KEY (`recorded_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Engineer_Visits': 'CREATE TABLE `Engineer_Visits` (\\n`engineer_visit_id` INTEGER PRIMARY KEY,\\n`contact_staff_id` INTEGER,\\n`engineer_id` INTEGER NOT NULL,\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\n`visit_start_datetime` DATETIME,\\n`visit_end_datetime` DATETIME,\\n`other_visit_details` VARCHAR(255),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` ),\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`contact_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Part_Faults': 'CREATE TABLE `Part_Faults` (\\n`part_fault_id` INTEGER PRIMARY KEY,\\n`part_id` INTEGER NOT NULL,\\n`fault_short_name` VARCHAR(20),\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` )\\n)', 'Fault_Log_Parts': 'CREATE TABLE `Fault_Log_Parts` (\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`part_fault_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` )\\n)', 'Skills_Required_To_Fix': 'CREATE TABLE `Skills_Required_To_Fix` (\\n`part_fault_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)'}\n\n## User-Prompt:\nكم عدد المهندسين الذين تواصل معهم كل موظف؟ أذكر اسم الموظف وعدد المهندسين الذين تم التواصل معهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT gender FROM staff GROUP BY gender ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Title\" text,\\n\"Studio\" text,\\n\"Director\" text,\\n\"Gross_in_dollar\" int,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"Country\" text,\\n\"Number_cities\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'film_market_estimation': 'CREATE TABLE \"film_market_estimation\" (\\n\"Estimation_ID\" int,\\n\"Low_Estimate\" real,\\n\"High_Estimate\" real,\\n\"Film_ID\" int,\\n\"Type\" text,\\n\"Market_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Estimation_ID\"),\\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\\n)'}\n\n## User-Prompt:\nما هي الدول للأسواق وسنوات تقديراتها السوقية المقابلة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هو متوسط خط العرض وخط الطول للمحطات الموجودة في مدينة سان جوزيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(lat) , avg(long) FROM station WHERE city = \"San Jose\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nحساب إجمالي عدد المباريات التي حضرها فريق بوسطن ريد ستوكينغز من عام 1990 إلى عام 2000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هو العدد الإجمالي للأشخاص الذين ليس لديهم أصدقاء يعيشون في أوستن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nكم هو عدد أنواع البطاقات المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT card_type_code) FROM Customers_Cards\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nاعرض معرفات الطلبات وعدد الفواتير لكل طلب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_id , count(*) FROM Invoices GROUP BY order_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الدول التي تحتوي على جبال بارتفاع يزيد عن 5600 وجبال بارتفاع يقل عن 5200.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هو اسم الشركة مع عدد محطات الوقود؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (Service_ID)\\n)', 'Participants': 'CREATE TABLE Participants (\\nParticipant_ID INTEGER NOT NULL,\\nParticipant_Type_Code CHAR(15) NOT NULL,\\nParticipant_Details VARCHAR(255),\\nPRIMARY KEY (Participant_ID)\\n)', 'Events': 'CREATE TABLE Events (\\nEvent_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nEvent_Details VARCHAR(255),\\nPRIMARY KEY (Event_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID)\\n)', 'Participants_in_Events': 'CREATE TABLE Participants_in_Events (\\nEvent_ID INTEGER NOT NULL,\\nParticipant_ID INTEGER NOT NULL,\\nPRIMARY KEY (Event_ID, Participant_ID),\\nFOREIGN KEY (Participant_ID) REFERENCES Participants (Participant_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID)\\n)'}\n\n## User-Prompt:\nما هي الهويات والتفاصيل للأحداث التي يشارك فيها أكثر من شخص واحد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.event_id , T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nما هي الأوراق التي يكون فيها الكاتب الثاني له اللقب تورون ومنتمٍ إلى مؤسسة في البلد الولايات المتحدة الأمريكية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أسماء الدورات بترتيب أبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT course_name FROM courses ORDER BY course_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nكم عدد الفصول التي يقوم بتدريسها البروفيسور الذي يحمل اسم العائلة جرازتيفسكي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.EMP_FNAME , T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = \"ACCT-211\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nارجع جميع طرق الدفع المميزة المستخدمة من قبل العملاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT payment_method FROM customers\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن عدد الطلاب الذين تتجاوز أعمارهم متوسط الأعمار لكل جنس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nفي أي مدينة يعيش الموظف الذي يساعد العميل الذي لديه الرمز البريدي 70174؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = \"70174\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأظهر جميع أسماء المدارس بالترتيب الأبجدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT school_name FROM school ORDER BY school_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nالعثور على وصف منطقة التسويق للصين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nاعثر على المتوسط السعري للمسارات من نوع الروك.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nما هو البلد الذي ينتمي إليه معظم الأوراق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nأي حرم جامعي بدأ في عام ١٩٥٦، ولديه أكثر من ٢٠٠ طالب بدوام كامل، وأكثر من ٤٠٠ طالب مسجل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nلكل حرم جامعي في مقاطعة أورانج، أبلغ عن عدد الدرجات الممنوحة بعد عام ٢٠٠٠.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء المديرين لمحطات الوقود التي تديرها شركة ExxonMobil؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nمن قام بأداء الأغنية المسماة بادلاندز؟ أظهر الاسم الأول والاسم الأخير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = \"Marianne\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nاعثر على عدد الأشخاص الذين يكون عمرهم أكبر من جميع المهندسين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي المدن المختلفة التي يعيش فيها الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هو رمز نوع الميزانية الذي يعد الأكثر شيوعًا بين الوثائق ذات التكاليف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي أسماء الأقسام، والمدن، والولايات أو المقاطعات لكل قسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.department_name , T2.city , T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nعرض الأماكن المختلفة للمناظرات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT Venue FROM debate\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هي الاسم ورمز الدور وتاريخ الميلاد للموظف بالاسم 'أرماني'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nمتى وفي أي رمز بريدي وصلت درجة الحرارة القصوى إلى 80؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date , zip_code FROM weather WHERE max_temperature_f >= 80\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هو كود نوع المستند لنوع المستند ورقة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = \"RV\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nابحث عن اسم ورقم تعريفى التقسيم للمستخدمين الذين قاموا بنشر أقل من مرتين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) < 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو اسم المطار الوجهة الأكثر ازدحامًا الذي يدير أكبر عدد من الطرق في الصين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nأظهر تاريخ وموقع كل ورشة عمل بترتيب أبجدي تصاعدي للموقع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هي المدن التي لا يعيش فيها أي عميل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = \"Colorado\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'manufacturer': 'CREATE TABLE \"manufacturer\" (\\n \"Manufacturer_ID\" int,\\n \"Open_Year\" real,\\n \"Name\" text,\\n \"Num_of_Factories\" int,\\n \"Num_of_Shops\" int,\\n PRIMARY KEY (\"Manufacturer_ID\")\\n)', 'furniture': 'CREATE TABLE \"furniture\" (\\n \"Furniture_ID\" int,\\n \"Name\" text,\\n \"Num_of_Component\" int,\\n \"Market_Rate\" real,\\n PRIMARY KEY (\"Furniture_ID\")\\n)', 'furniture_manufacte': 'CREATE TABLE \"furniture_manufacte\" (\\n \"Manufacturer_ID\" int,\\n \"Furniture_ID\" int,\\n \"Price_in_Dollar\" real,\\n PRIMARY KEY (\"Manufacturer_ID\",\"Furniture_ID\"),\\n FOREIGN KEY (\"Manufacturer_ID\") REFERENCES `manufacturer`(\"Manufacturer_ID\"),\\n FOREIGN KEY (\"Furniture_ID\") REFERENCES `furniture`(\"Furniture_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء وأسعار الأثاث الذي تقوم بتصنيعه بعض الشركات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'event': 'CREATE TABLE \"event\" (\\n \"Event_ID\" int,\\n \"Date\" text,\\n \"Venue\" text,\\n \"Name\" text,\\n \"Event_Attendance\" int,\\n PRIMARY KEY (\"Event_ID\")\\n)', 'journalist': 'CREATE TABLE \"journalist\" (\\n \"journalist_ID\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Age\" text,\\n \"Years_working\" int,\\n PRIMARY KEY (\"journalist_ID\")\\n)', 'news_report': 'CREATE TABLE \"news_report\" (\\n \"journalist_ID\" int,\\n \"Event_ID\" int,\\n \"Work_Type\" text,\\n PRIMARY KEY (\"journalist_ID\",\"Event_ID\"),\\n FOREIGN KEY (\"journalist_ID\") REFERENCES `journalist`(\"journalist_ID\"),\\n FOREIGN KEY (\"Event_ID\") REFERENCES `event`(\"Event_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء الصحفيين الذين قاموا بتغطية أكثر من حدث واحد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nأعد وصف هيكل المستند الذي تم الوصول إليه بأقل عدد من المرات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nما هي جميع المناطق المتميزة للانتخابات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(Population) , min(Population) FROM county\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nكم عدد المسارات في نوع الوسائط ملف صوت AAC؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = \"AAC audio file\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nكم عدد الألبومات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM ALBUM\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nابحث عن أسماء الكليات المختلفة المشاركة في التجربة بترتيب أبجدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nحساب عدد القباطنة الذين أعمارهم أقل من 50 في كل رتبة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي معرفات محطات الوقود، مواقعها، وأسماء المديرين لمحطات الوقود مرتبة حسب سنة الافتتاح؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nعدد المؤسسات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM inst\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'medicine': 'CREATE TABLE \"medicine\" (\\n\"id\" int,\\n\"name\" text,\\n\"Trade_Name\" text,\\n\"FDA_approved\" text,\\nprimary key (\"id\")\\n)', 'enzyme': 'CREATE TABLE \"enzyme\" (\\n\"id\" int,\\n\"name\" text,\\n\"Location\" text,\\n\"Product\" text,\\n\"Chromosome\" text,\\n\"OMIM\" int,\\n\"Porphyria\" text,\\nprimary key (\"id\")\\n)', 'medicine_enzyme_interaction': 'CREATE TABLE \"medicine_enzyme_interaction\" (\\n\"enzyme_id\" int,\\n\"medicine_id\" int,\\n\"interaction_type\" text,\\nprimary key (\"enzyme_id\", \"medicine_id\"),\\nforeign key (\"enzyme_id\") references `enzyme`(\"id\"),\\nforeign key (\"medicine_id\") references `medicine`(\"id\")\\n)'}\n\n## User-Prompt:\nقائمة بأسماء الأدوية وأسماء التجارية التي يمكن أن تتفاعل كـ 'مثبط' و 'منشط' مع الإنزيمات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'journal': 'CREATE TABLE \"journal\" (\\n\"Journal_ID\" int,\\n\"Date\" text,\\n\"Theme\" text,\\n\"Sales\" int,\\nPRIMARY KEY (\"Journal_ID\")\\n)', 'editor': 'CREATE TABLE \"editor\" (\\n\"Editor_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\nPRIMARY KEY (\"Editor_ID\")\\n)', 'journal_committee': 'CREATE TABLE \"journal_committee\" (\\n\"Editor_ID\" int,\\n\"Journal_ID\" int,\\n\"Work_Type\" text,\\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء وأعمار المحررين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name , Age FROM editor\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن العمر المتوسط للطلاب الذين يعيشون في كل مسكن واسم المسكن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nقم بسرد البلدان التي لديها أكثر من 4 عناوين مُدرجة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT city FROM addresses WHERE zip_postcode = 255\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو إجمالي عدد الموظفين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nاعثر على أسماء الفروع التي تضم بعض الأعضاء الذين يأتون من مدينة لويسفيل، كنتاكي، وبعضهم الآخر من هيرام، جورجيا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى للأساتذة الذين يدرسون أكثر من صف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree != 'Ph.D.'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nأي كلية تحتوي على لاعبين يلعبون في موقع لاعب وسط ولاعبين يلعبون في موقع الدفاع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT College FROM match_season WHERE POSITION = \"Midfielder\" INTERSECT SELECT College FROM match_season WHERE POSITION = \"Defender\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nما هي الأسماء، والمواقع، وسنوات الافتتاح للمضامير التي تحتوي على عدد مقاعد أعلى من المتوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'musical': 'CREATE TABLE \"musical\" (\\n\"Musical_ID\" int,\\n\"Name\" text,\\n\"Year\" int,\\n\"Award\" text,\\n\"Category\" text,\\n\"Nominee\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"Musical_ID\")\\n)', 'actor': 'CREATE TABLE \"actor\" (\\n\"Actor_ID\" int,\\n\"Name\" text,\\n\"Musical_ID\" int,\\n\"Character\" text,\\n\"Duration\" text,\\n\"age\" int,\\nPRIMARY KEY (\"Actor_ID\"),\\nFOREIGN KEY (\"Musical_ID\") REFERENCES \"actor\"(\"Actor_ID\")\\n)'}\n\n## User-Prompt:\nقدم مدى عمر الفنان الأكبر سنًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Duration FROM actor ORDER BY Age DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو معرفة واسم الموظف ذي الراتب الأعلى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT eid , name FROM Employee ORDER BY salary DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(15),\\n`product_name` VARCHAR(80),\\n`product_price` DOUBLE NULL\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15),\\n`customer_number` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Contacts': 'CREATE TABLE `Contacts` (\\n`contact_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(50),\\n`contact_phone` VARCHAR(80)\\n)', 'Customer_Address_History': 'CREATE TABLE `Customer_Address_History` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_date` DATETIME NOT NULL,\\n`order_status_code` VARCHAR(15),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER NOT NULL ,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(80),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nأظهر أسماء العملاء الذين يستخدمون طريقة الدفع ببطاقة الائتمان ولديهم أكثر من طلبين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.customer_name , T3.city , T1.date_from , T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nما هي قائمة مواقع المدارس مرتبة بترتيب تصاعدي حسب عدد الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION FROM school ORDER BY Enrollment ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nقائمة ألوان المدرسة للمدرسة التي تحتوي على أكبر عدد من الطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي سنوات البداية المشتركة بين الفنيين من فريق CLE أو CWS؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'train': 'CREATE TABLE \"train\" (\\n \"id\" int,\\n \"train_number\" int,\\n \"name\" text,\\n \"origin\" text,\\n \"destination\" text,\\n \"time\" text,\\n \"interval\" text,\\n primary key (\"id\")\\n)', 'station': 'CREATE TABLE \"station\" (\\n \"id\" int,\\n \"network_name\" text,\\n \"services\" text,\\n \"local_authority\" text,\\n primary key (\"id\")\\n)', 'route': 'CREATE TABLE \"route\" (\\n \"train_id\" int,\\n \"station_id\" int,\\n primary key (\"train_id\", \"station_id\"),\\n foreign key (\"train_id\") references `train`(\"id\"),\\n foreign key (\"station_id\") references `station`(\"id\")\\n)', 'weekly_weather': 'CREATE TABLE \"weekly_weather\" (\\n \"station_id\" int,\\n \"day_of_week\" text,\\n \"high_temperature\" int,\\n \"low_temperature\" int,\\n \"precipitation\" real,\\n \"wind_speed_mph\" int,\\n primary key (\"station_id\", \"day_of_week\"),\\n foreign key (\"station_id\") references \"station\"(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أدنى درجة حرارة منخفضة وأعلى سرعة للرياح بالأميال في الساعة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING max(t1.precipitation) > 50\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nابحث عن متوسط طول اللاعبين الذين ينتمون إلى الكلية المعروفة باسم جامعة ييل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء الأخيرة دون تجاوز مجموع الفواتير 20؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nأي الكليات التي تحتوي على كل من المؤلفين الذين قدموا تقديماتهم بدرجة أعلى من 90 والمؤلفين الذين قدموا تقديماتهم بدرجة أقل من 80؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nإلى أي كليات ينتمي كل لاعب يخوض التجربة ويبدأ اسمه بالحرف د؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nاعثر على السعة ونوع الجنس للسكن الذي يحتوي اسمه على متغير 'Donor'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT gender) FROM dorm\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nابحث عن التواريخ التي تم فيها عمل أكثر من مراجعة واحدة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الكاملة للممثلين الذين شاركوا في أكثر من 30 فيلمًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nأي لاعبين فازوا بجوائز في كل من عام 1960 وعام 1961؟ الرجاء إعادة أسمائهم الأولى والأخيرة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nفي كم مدينة هناك مطارات في بلاد جرينلاند؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هي اسم القسم والغرفة للدورة INTRODUCTION TO COMPUTER SCIENCE؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = \"INTRODUCTION TO COMPUTER SCIENCE\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nما هي التفاصيل المميزة للفواتير التي تم إنشاؤها قبل تاريخ 1989-09-03 أو بعد تاريخ 2007-12-25؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Address\" text,\\n\"Num_of_staff\" text,\\n\"Score\" real,\\n\"Open_Year\" text,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Membership_card\" text,\\n\"Age\" int,\\n\"Time_of_purchase\" int,\\n\"Level_of_membership\" int,\\n\"Address\" text,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'happy_hour': 'CREATE TABLE \"happy_hour\" (\\n\"HH_ID\" int,\\n\"Shop_ID\" int,\\n\"Month\" text,\\n\"Num_of_shaff_in_charge\" int,\\nPRIMARY KEY (\"HH_ID\",\"Shop_ID\",\"Month\"),\\nFOREIGN KEY (\"Shop_ID\") REFERENCES `shop`(\"Shop_ID\")\\n)', 'happy_hour_member': 'CREATE TABLE \"happy_hour_member\" (\\n\"HH_ID\" int,\\n\"Member_ID\" int,\\n\"Total_amount\" real,\\nPRIMARY KEY (\"HH_ID\",\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nأي شهور تحتوي على أكثر من 2 ساعة سعيدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT MONTH FROM happy_hour GROUP BY MONTH HAVING count(*) > 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هو أعلى راتب في كل فريق؟ قم بسرد اسم الفريق والهوية والراتب الأقصى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر متوسط ​​مبلغ المعاملات للكثيرين المختلفة، مرتبة حسب متوسط ​​مبلغ المعاملات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nاعرض الموضوع والسنة لجميع المعارض التي تتوفر تذاكرها بأسعار أقل من 15.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT theme , YEAR FROM exhibition WHERE ticket_price < 15\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هو إجمالي حضور الجماهير في المباريات الداخلية لفريق Boston Red Stockings من عام 2000 إلى 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الهويات المميزة لأقسام تديرها مدير يشرف على ٤ موظفين أو أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي أسماء جميع المشاركين في التجربة الذين ينتمون إلى الكلية ذات الحجم الأكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Premises': 'CREATE TABLE `Premises` (\\n`premise_id` INTEGER PRIMARY KEY,\\n`premises_type` VARCHAR(15) NOT NULL,\\n`premise_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_category` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_login` VARCHAR(80),\\n`customer_password` VARCHAR(10)\\n)', 'Mailshot_Campaigns': 'CREATE TABLE `Mailshot_Campaigns` (\\n`mailshot_id` INTEGER PRIMARY KEY,\\n`product_category` VARCHAR(15),\\n`mailshot_name` VARCHAR(80),\\n`mailshot_start_date` DATETIME,\\n`mailshot_end_date` DATETIME\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`premise_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`premise_id` ) REFERENCES `Premises`(`premise_id` )\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(15) NOT NULL,\\n`shipping_method_code` VARCHAR(15) NOT NULL,\\n`order_placed_datetime` DATETIME NOT NULL,\\n`order_delivered_datetime` DATETIME,\\n`order_shipping_charges` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Mailshot_Customers': 'CREATE TABLE `Mailshot_Customers` (\\n`mailshot_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(15) NOT NULL,\\n`mailshot_customer_date` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`mailshot_id` ) REFERENCES `Mailshot_Campaigns`(`mailshot_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`item_id` INTEGER NOT NULL ,\\n`order_item_status_code` VARCHAR(15) NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`item_status_code` VARCHAR(15),\\n`item_delivered_datetime` DATETIME,\\n`item_order_quantity` VARCHAR(80),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nعرض أسماء العملاء الذين لديهم طلب بطريقة شحن FedEx وحالة الطلب المدفوعة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_shipping_charges , customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي أسماء النبيذ الذي حصل على تقييمات تزيد عن 90؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM WINE WHERE score > 90\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nلكم نادٍ يكون تريسي كيم عضوًا فيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Tracy\" AND t3.lname = \"Kim\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'architect': 'CREATE TABLE \"architect\" (\\n\"id\" text,\\n\"name\" text,\\n\"nationality\" text,\\n\"gender\" text,\\nprimary key(\"id\")\\n)', 'bridge': 'CREATE TABLE \"bridge\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"name\" text,\\n\"location\" text,\\n\"length_meters\" real,\\n\"length_feet\" real,\\nprimary key(\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)', 'mill': 'CREATE TABLE \"mill\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"location\" text,\\n\"name\" text,\\n\"type\" text,\\n\"built_year\" int,\\n\"notes\" text,\\nprimary key (\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)'}\n\n## User-Prompt:\nما هو المتوسط ​​للطول بالقدمين للجسور؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nما هي عناوين الأوراق التي يكون الكاتب الأول منتمياً إلى مؤسسة في البلد اليابان ولديه اللقب أوهوري؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'perpetrator': 'CREATE TABLE \"perpetrator\" (\\n\"Perpetrator_ID\" int,\\n\"People_ID\" int,\\n\"Date\" text,\\n\"Year\" real,\\n\"Location\" text,\\n\"Country\" text,\\n\"Killed\" int,\\n\"Injured\" int,\\nPRIMARY KEY (\"Perpetrator_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Home Town\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد مواقع المرتكبين المميزة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT LOCATION) FROM perpetrator\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هي خطوط العرض والطول والمدينة للمحطة التي بدأت فيها الرحلة ذات أقل مدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nالعدد الكلي للأدوية الموصوفة لكل علامة تجارية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.name , T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = \"X\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nعدد السياسات الإجمالي المستخدمة بواسطة العميل بالاسم ديانا روبيل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Dayana Robel\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nكم عدد الآلات المختلفة التي تستخدمها الأغنية بادلاندز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'driver': 'CREATE TABLE \"driver\" (\\n\"Driver_ID\" int,\\n\"Name\" text,\\n\"Party\" text,\\n\"Home_city\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"Driver_ID\")\\n)', 'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"Grade\" text,\\n\"School\" text,\\n\"Location\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"School_ID\")\\n)', 'school_bus': 'CREATE TABLE \"school_bus\" (\\n\"School_ID\" int,\\n\"Driver_ID\" int,\\n\"Years_Working\" int,\\n\"If_full_time\" bool,\\nPRIMARY KEY (\"School_ID\",\"Driver_ID\"),\\nFOREIGN KEY (\"School_ID\") REFERENCES `school`(\"School_ID\"),\\nFOREIGN KEY (\"Driver_ID\") REFERENCES `driver`(\"Driver_ID\")\\n)'}\n\n## User-Prompt:\nأظهر اسم المدرسة واسم السائق لجميع حافلات المدرسة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام هواتف المحمول للمرشحين الذين حصلوا على رمز تقييم Fail؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أحجام الملف والتنسيق لجميع الأغاني التي تحتوي على دقة أقل من 800؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي البلدان التي لم تشارك في أي مسابقات من نوع الودية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nStaff_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Staff_ID)\\n)', 'Policies': 'CREATE TABLE Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATETIME,\\nEnd_Date DATETIME,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claim_Headers': 'CREATE TABLE Claim_Headers (\\nClaim_Header_ID INTEGER NOT NULL,\\nClaim_Status_Code CHAR(15) NOT NULL,\\nClaim_Type_Code CHAR(15) NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_of_Claim DATETIME,\\nDate_of_Settlement DATETIME,\\nAmount_Claimed DECIMAL(20,4),\\nAmount_Piad DECIMAL(20,4),\\nPRIMARY KEY (Claim_Header_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Policies (Policy_ID)\\n)', 'Claims_Documents': 'CREATE TABLE Claims_Documents (\\nClaim_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nCreated_by_Staff_ID INTEGER,\\nCreated_Date INTEGER,\\nPRIMARY KEY (Claim_ID, Document_Type_Code),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Created_by_Staff_ID) REFERENCES Staff (Staff_ID)\\n)', 'Claims_Processing_Stages': 'CREATE TABLE Claims_Processing_Stages (\\nClaim_Stage_ID INTEGER NOT NULL,\\nNext_Claim_Stage_ID INTEGER,\\nClaim_Status_Name VARCHAR(255) NOT NULL,\\nClaim_Status_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Claim_Stage_ID)\\n)', 'Claims_Processing': 'CREATE TABLE Claims_Processing (\\nClaim_Processing_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nClaim_Outcome_Code CHAR(15) NOT NULL,\\nClaim_Stage_ID INTEGER NOT NULL,\\nStaff_ID INTEGER,\\nPRIMARY KEY (Claim_Processing_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Staff_ID) REFERENCES Staff (Staff_ID)\\n)'}\n\n## User-Prompt:\nأي الزبائن الذين يحتوي اسمهم على ديانا كجزء منه؟ أعد تفاصيل الزبون.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_details FROM customers WHERE customer_details LIKE \"%Diana%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nاعثر على الاسم والوصف للدور ذو الرمز MG.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT role_name , role_description FROM ROLES WHERE role_code = \"MG\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nاعثر على أسماء وإجمالي رصيد الفحص والادخار للحسابات التي يكون رصيدها للادخار أعلى من المتوسط ​​لرصيد التوفير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nعدد البلدان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM country\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nقائمة بأسماء وأرقام هواتف جميع الموردين المميزين الذين يوردون جينز أحمر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي أنواع الأصوات الغنائية المستخدمة في الأغنية لو بوب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما اسم الفئة التي ينتمي إليها فيلم 'HUNGER ROOF'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Representative_ID\" int,\\n\"Date\" text,\\n\"Votes\" real,\\n\"Vote_Percent\" real,\\n\"Seats\" real,\\n\"Place\" real,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\\n)', 'representative': 'CREATE TABLE \"representative\" (\\n\"Representative_ID\" int,\\n\"Name\" text,\\n\"State\" text,\\n\"Party\" text,\\n\"Lifespan\" text,\\nPRIMARY KEY (\"Representative_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء النواب والأحزاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name , Party FROM representative\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Address\" text,\\n\"Num_of_staff\" text,\\n\"Score\" real,\\n\"Open_Year\" text,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Membership_card\" text,\\n\"Age\" int,\\n\"Time_of_purchase\" int,\\n\"Level_of_membership\" int,\\n\"Address\" text,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'happy_hour': 'CREATE TABLE \"happy_hour\" (\\n\"HH_ID\" int,\\n\"Shop_ID\" int,\\n\"Month\" text,\\n\"Num_of_shaff_in_charge\" int,\\nPRIMARY KEY (\"HH_ID\",\"Shop_ID\",\"Month\"),\\nFOREIGN KEY (\"Shop_ID\") REFERENCES `shop`(\"Shop_ID\")\\n)', 'happy_hour_member': 'CREATE TABLE \"happy_hour_member\" (\\n\"HH_ID\" int,\\n\"Member_ID\" int,\\n\"Total_amount\" real,\\nPRIMARY KEY (\"HH_ID\",\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد الأعضاء الذين يمتلكون بطاقة العضوية السوداء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM member WHERE Membership_card = 'Black'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nسرد جميع المعلومات المتعلقة بمباراة كرة السلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT * FROM basketball_match\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفئات المختلفة ومعرّفاتها، وكم عدد الأفلام في كل منها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Party_Theme\" text,\\n\"Location\" text,\\n\"First_year\" text,\\n\"Last_year\" text,\\n\"Number_of_hosts\" int,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'host': 'CREATE TABLE \"host\" (\\n\"Host_ID\" int,\\n\"Name\" text,\\n\"Nationality\" text,\\n\"Age\" text,\\nPRIMARY KEY (\"Host_ID\")\\n)', 'party_host': 'CREATE TABLE \"party_host\" (\\n\"Party_ID\" int,\\n\"Host_ID\" int,\\n\"Is_Main_in_Charge\" bool,\\nPRIMARY KEY (\"Party_ID\",\"Host_ID\"),\\nFOREIGN KEY (\"Host_ID\") REFERENCES `host`(\"Host_ID\"),\\nFOREIGN KEY (\"Party_ID\") REFERENCES `party`(\"Party_ID\")\\n)'}\n\n## User-Prompt:\nأي الحفلات التي تضم مضيفين يبلغون من العمر أكثر من 50 عامًا؟ أعطني مواقع الحفلات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nأي الأوراق لديها ستيفاني ويريتش كمؤلف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أسعار المنتجات التي لم تتلق شكوى واحدة عنها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو الاسم والراتب للموظف ذي الرقم تعريفى 242518965؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , salary FROM Employee WHERE eid = 242518965\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nأي الأفلام التي تحتوي على 'Deleted Scenes' كجزء من الميزات الخاصة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT rating) FROM film\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nأظهر رقم الرحلة لجميع الرحلات التي تزيد مسافتها عن 2000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT flno FROM Flight WHERE distance > 2000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nأظهر جميع اللغات الأم الرسمية التي تحتوي على كلمة إنجليزية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Official_native_language FROM country WHERE Official_native_language LIKE \"%English%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على أسماء المدرسين الذين قاموا بتدريس دورة برمجة C من قبل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n \"Member_ID\" text,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Role\" text,\\n PRIMARY KEY (\"Member_ID\")\\n)', 'performance': 'CREATE TABLE \"performance\" (\\n \"Performance_ID\" real,\\n \"Date\" text,\\n \"Host\" text,\\n \"Location\" text,\\n \"Attendance\" int,\\n PRIMARY KEY (\"Performance_ID\")\\n)', 'member_attendance': 'CREATE TABLE \"member_attendance\" (\\n \"Member_ID\" int,\\n \"Performance_ID\" int,\\n \"Num_of_Pieces\" int,\\n PRIMARY KEY (\"Member_ID\",\"Performance_ID\"),\\n FOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\"),\\n FOREIGN KEY (\"Performance_ID\") REFERENCES `performance`(\"Performance_ID\")\\n)'}\n\n## User-Prompt:\nما هو تاريخ الأداء الذي شهد أعلى عدد من الحضور؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nعدد الأجهزة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM device\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Problem_Category_Codes': 'CREATE TABLE `Problem_Category_Codes` (\\n`problem_category_code` VARCHAR(20) PRIMARY KEY,\\n`problem_category_description` VARCHAR(80)\\n)', 'Problem_Log': 'CREATE TABLE `Problem_Log` (\\n`problem_log_id` INTEGER PRIMARY KEY,\\n`assigned_to_staff_id` INTEGER NOT NULL,\\n`problem_id` INTEGER NOT NULL,\\n`problem_category_code` VARCHAR(20) NOT NULL,\\n`problem_status_code` VARCHAR(20) NOT NULL,\\n`log_entry_date` DATETIME,\\n`log_entry_description` VARCHAR(255),\\n`log_entry_fix` VARCHAR(255),\\n`other_log_details` VARCHAR(255),\\nFOREIGN KEY (`problem_category_code` ) REFERENCES `Problem_Category_Codes`(`problem_category_code` ),FOREIGN KEY (`assigned_to_staff_id` ) REFERENCES `Staff`(`staff_id` ),FOREIGN KEY (`problem_id` ) REFERENCES `Problems`(`problem_id` ),FOREIGN KEY (`problem_status_code` ) REFERENCES `Problem_Status_Codes`(`problem_status_code` )\\n)', 'Problem_Status_Codes': 'CREATE TABLE `Problem_Status_Codes` (\\n`problem_status_code` VARCHAR(20) PRIMARY KEY,\\n`problem_status_description` VARCHAR(80)\\n)', 'Product': 'CREATE TABLE `Product` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_first_name` VARCHAR(80),\\n`staff_last_name` VARCHAR(80),\\n`other_staff_details` VARCHAR(255)\\n)', 'Problems': 'CREATE TABLE `Problems` (\\n`problem_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`closure_authorised_by_staff_id` INTEGER NOT NULL,\\n`reported_by_staff_id` INTEGER NOT NULL,\\n`date_problem_reported` DATETIME NOT NULL,\\n`date_problem_closed` DATETIME,\\n`problem_description` VARCHAR(255),\\n`other_problem_details` VARCHAR(255),\\nFOREIGN KEY (`closure_authorised_by_staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Product`(`product_id` ),\\nFOREIGN KEY (`reported_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nاعثر على أعلى 3 منتجات التي تحتوي على أكبر عدد من المشاكل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Rylan\" AND T4.staff_last_name = \"Homenick\" )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nStaff_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Staff_ID)\\n)', 'Policies': 'CREATE TABLE Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATETIME,\\nEnd_Date DATETIME,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claim_Headers': 'CREATE TABLE Claim_Headers (\\nClaim_Header_ID INTEGER NOT NULL,\\nClaim_Status_Code CHAR(15) NOT NULL,\\nClaim_Type_Code CHAR(15) NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_of_Claim DATETIME,\\nDate_of_Settlement DATETIME,\\nAmount_Claimed DECIMAL(20,4),\\nAmount_Piad DECIMAL(20,4),\\nPRIMARY KEY (Claim_Header_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Policies (Policy_ID)\\n)', 'Claims_Documents': 'CREATE TABLE Claims_Documents (\\nClaim_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nCreated_by_Staff_ID INTEGER,\\nCreated_Date INTEGER,\\nPRIMARY KEY (Claim_ID, Document_Type_Code),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Created_by_Staff_ID) REFERENCES Staff (Staff_ID)\\n)', 'Claims_Processing_Stages': 'CREATE TABLE Claims_Processing_Stages (\\nClaim_Stage_ID INTEGER NOT NULL,\\nNext_Claim_Stage_ID INTEGER,\\nClaim_Status_Name VARCHAR(255) NOT NULL,\\nClaim_Status_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Claim_Stage_ID)\\n)', 'Claims_Processing': 'CREATE TABLE Claims_Processing (\\nClaim_Processing_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nClaim_Outcome_Code CHAR(15) NOT NULL,\\nClaim_Stage_ID INTEGER NOT NULL,\\nStaff_ID INTEGER,\\nPRIMARY KEY (Claim_Processing_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Staff_ID) REFERENCES Staff (Staff_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء وأعضاء الطاقم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_details FROM customers UNION SELECT staff_details FROM staff\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nأي الأطباء الذين لم يأخذوا أي مواعيد؟ ابحث عن أسمائهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nابحث عن اسم العائلة لأحدث فرد اتصال للهيئة Labour Party.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n \"People_ID\" int,\\n \"Age\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Graduation_College\" text,\\n PRIMARY KEY (\"People_ID\")\\n)', 'company': 'CREATE TABLE \"company\" (\\n \"Company_ID\" real,\\n \"Name\" text,\\n \"Headquarters\" text,\\n \"Industry\" text,\\n \"Sales_in_Billion\" real,\\n \"Profits_in_Billion\" real,\\n \"Assets_in_Billion\" real,\\n \"Market_Value_in_Billion\" real,\\n PRIMARY KEY (\"Company_ID\")\\n)', 'employment': 'CREATE TABLE \"employment\" (\\n \"Company_ID\" int,\\n \"People_ID\" int,\\n \"Year_working\" int,\\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الشركات وأسماء الموظفين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Headquarters FROM company WHERE Industry = \"Banking\" INTERSECT SELECT Headquarters FROM company WHERE Industry = \"Oil and gas\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي الحرم الجامعية التي كانت لديها بين 600 و 1000 عضو هيئة تدريسية في عام 2004؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nقائمة بعدد الفواتير من الولايات المتحدة، مجمعة حسب الولاية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\ncustomer_id INTEGER NOT NULL,\\ncustomer_details VARCHAR(255),\\nPRIMARY KEY (customer_id)\\n)', 'Properties': 'CREATE TABLE Properties (\\nproperty_id INTEGER NOT NULL,\\nproperty_type_code CHAR(15) NOT NULL,\\nproperty_address VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (property_id)\\n)', 'Residents': 'CREATE TABLE Residents (\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\ndate_moved_out DATETIME NOT NULL,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, property_id, date_moved_in),\\nFOREIGN KEY (property_id) REFERENCES Properties (property_id)\\n)', 'Organizations': 'CREATE TABLE Organizations (\\norganization_id INTEGER NOT NULL,\\nparent_organization_id INTEGER,\\norganization_details VARCHAR(255),\\nPRIMARY KEY (organization_id)\\n)', 'Services': 'CREATE TABLE Services (\\nservice_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (service_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Residents_Services': 'CREATE TABLE Residents_Services (\\nresident_id INTEGER NOT NULL,\\nservice_id INTEGER NOT NULL,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\ndate_requested DATETIME,\\ndate_provided DATETIME,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, service_id),\\nFOREIGN KEY (service_id) REFERENCES Services (service_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Things': 'CREATE TABLE Things (\\nthing_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nType_of_Thing_Code CHAR(15) NOT NULL,\\nservice_type_code CHAR(10) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (thing_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Customer_Events': 'CREATE TABLE Customer_Events (\\nCustomer_Event_ID INTEGER NOT NULL,\\ncustomer_id INTEGER,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\nresident_id INTEGER,\\nthing_id INTEGER NOT NULL,\\nPRIMARY KEY (Customer_Event_ID),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id),\\nFOREIGN KEY (customer_id) REFERENCES Customers (customer_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Customer_Event_Notes': 'CREATE TABLE Customer_Event_Notes (\\nCustomer_Event_Note_ID INTEGER NOT NULL,\\nCustomer_Event_ID INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\nPRIMARY KEY (Customer_Event_Note_ID),\\nFOREIGN KEY (Customer_Event_ID) REFERENCES Customer_Events (Customer_Event_ID)\\n)', 'Timed_Status_of_Things': 'CREATE TABLE Timed_Status_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Date DATETIME NOT NULL,\\nStatus_of_Thing_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Date, Status_of_Thing_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id)\\n)', 'Timed_Locations_of_Things': 'CREATE TABLE Timed_Locations_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Time DATETIME NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Time, Location_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id))'}\n\n## User-Prompt:\nكم عدد المدارس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT date_moved_in FROM residents\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هي رموز المواقع المختلفة للوثائق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Human Resource\" OR T2.role_name = \"Manager\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين لديهم رصيد فحص أعلى من رصيد الادخار المقابل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة لجميع الطلاب الذين يعيشون في مساكن تحتوي على صالة تلفزيون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nاعثر على تواريخ الطلبات التي تنتمي إلى العميل بالاسم Jeramie.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nما هي الفرق وموقع المدرسة التي ينتمي إليها كل لاعب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nاذكر أسماء الطلاب الأولى في الغرفة 107.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT firstname FROM list WHERE classroom = 107\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'gymnast': 'CREATE TABLE \"gymnast\" (\\n\"Gymnast_ID\" int,\\n\"Floor_Exercise_Points\" real,\\n\"Pommel_Horse_Points\" real,\\n\"Rings_Points\" real,\\n\"Vault_Points\" real,\\n\"Parallel_Bars_Points\" real,\\n\"Horizontal_Bar_Points\" real,\\n\"Total_Points\" real,\\nPRIMARY KEY (\"Gymnast_ID\"),\\nFOREIGN KEY (\"Gymnast_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\n\"Height\" real,\\n\"Hometown\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nقائمة نقاط الجمبازين بترتيب تنازلي حسب نقاط تمرين الأرض.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع الفنانين، وأعمارهم، وبلدانهم مرتبة حسب سنوات انضمامهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , age , country FROM artist ORDER BY Year_Join\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nما هي المقاطعات الثلاث التي تمتلك أصغر عدد من السكان؟ أعطني أسماء المقاطعات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT County_name FROM county ORDER BY Population ASC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nابحث عن اسم وكلية الطلاب الذين قرارتهم نعم في التجربة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هي معرفات المحطات في سان فرانسيسكو التي عادةً ما تحتوي على أكثر من 10 دراجة متاحة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT id FROM station WHERE city = \"San Francisco\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nما هي أوقات الإقصاء للمصارعين الذين يحملون أكثر من 50 يومًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nأي عام يمتلك أعلى عدد من الدرجات الممنوحة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campus FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'publication': 'CREATE TABLE \"publication\" (\\n\"Publication_ID\" int,\\n\"Book_ID\" int,\\n\"Publisher\" text,\\n\"Publication_Date\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Publication_ID\"),\\nFOREIGN KEY (\"Book_ID\") REFERENCES \"book\"(\"Book_ID\")\\n)', 'book': 'CREATE TABLE \"book\" (\\n\"Book_ID\" int,\\n\"Title\" text,\\n\"Issues\" real,\\n\"Writer\" text,\\nPRIMARY KEY (\"Book_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بناشر الإصدار ذو أعلى سعر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد الشركات المتميزة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT Company) FROM entrepreneur\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Web_client_accelerator': 'CREATE TABLE \"Web_client_accelerator\" (\\n\"id\" int,\\n\"name\" text,\\n\"Operating_system\" text,\\n\"Client\" text,\\n\"Connection\" text,\\nprimary key(\"id\")\\n)', 'browser': 'CREATE TABLE \"browser\" (\\n\"id\" int,\\n\"name\" text,\\n\"market_share\" real,\\nprimary key(\"id\")\\n)', 'accelerator_compatible_browser': 'CREATE TABLE \"accelerator_compatible_browser\" (\\n\"accelerator_id\" int,\\n\"browser_id\" int,\\n\"compatible_since_year\" int,\\nprimary key(\"accelerator_id\", \"browser_id\"),\\nforeign key (\"accelerator_id\") references `Web_client_accelerator`(\"id\"),\\nforeign key (\"browser_id\") references `browser`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي الأسماء وأنظمة التشغيل لتسريعات عملاء الويب التي لا تعمل فقط مع اتصال من نوع 'Broadband'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , operating_system FROM web_client_accelerator WHERE CONNECTION != 'Broadband'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو اسم القسم الذي ينتمي إليه الطالب الذي يمتلك أقل معدل نقاط تراكمي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nاعرض الهويات لجميع الطلاب الذين لديهم مستشار 1121.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Student WHERE city_code = \"CHI\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة للاعبين الذين تكون سجلات وفاتهم فارغة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name_first , name_last FROM player WHERE death_year = '';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nأعطني جميع أرقام الهواتف وعناوين البريد الإلكتروني لمجموعات ورش العمل التي يتم فيها أداء الخدمات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هو متوسط عدد عملاء البنك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(no_of_customers) FROM bank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nما هو معرف الطلب الذي يحتوي على أكبر عدد من العناصر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT order_id FROM orders ORDER BY date_order_placed\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن نوع السفينة الذي يستخدمه كل من السفن ذات الأعلام البنمية والمالطية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM ship ORDER BY built_year , CLASS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nأي فريق يقدم أدنى متوسط راتب؟ قدم لي اسم الفريق والهوية الخاصة به.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nما هي الناشرين الذين لم يقوموا بنشر كتاب في عام 1989؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nارجع رمز القناة ورقم الاتصال لقناة الاتصال للعميل التي كانت مدة نشاطها الأطول.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(active_to_date - active_from_date) FROM customer_contact_channels\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أوضاع اللاعبين وما هو متوسط عدد النقاط لكل وضع للاعبين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nأظهر الاسم والمسافة للطائرات التي تمتلك مسافة أكثر من 5000 والتي يمتلكها على الأقل 5 أشخاص شهادات للطيران بها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول للموظف الذي لم يقدم أي درس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nكم عدد المعاملات التي يمتلكها الحساب بالاسم 337؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = \"337\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nأي ممرضات هي في الاستعداد مع الطابق رقم 1 وكود البلوك رقم 1؟ قل لي أسمائهن.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nأي المشاريع ليس لديها نتائج؟ قم بتقديم تفاصيل المشروع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nكم عدد عناصر الطلب التي تتوافق مع كل معرّف طلب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_id , count(*) FROM Order_items GROUP BY order_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'product': 'CREATE TABLE \"product\" (\\n\"product_id\" int,\\n\"product\" text,\\n\"dimensions\" text,\\n\"dpi\" real,\\n\"pages_per_minute_color\" real,\\n\"max_page_size\" text,\\n\"interface\" text,\\nPRIMARY KEY (\"product_id\")\\n)', 'store': 'CREATE TABLE \"store\" (\\n\"Store_ID\" int,\\n\"Store_Name\" text,\\n\"Type\" text,\\n\"Area_size\" real,\\n\"Number_of_product_category\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Store_ID\")\\n)', 'district': 'CREATE TABLE \"district\" (\\n\"District_ID\" int,\\n\"District_name\" text,\\n\"Headquartered_City\" text,\\n\"City_Population\" real,\\n\"City_Area\" real,\\nPRIMARY KEY (\"District_ID\")\\n)', 'store_product': 'CREATE TABLE \"store_product\" (\\n\"Store_ID\" int,\\n\"Product_ID\" int,\\nPRIMARY KEY (\"Store_ID\",\"Product_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`Product_ID`) REFERENCES `product`(`Product_ID`)\\n)', 'store_district': 'CREATE TABLE \"store_district\" (\\n\"Store_ID\" int,\\n\"District_ID\" int,\\nPRIMARY KEY (\"Store_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`District_ID`) REFERENCES `district`(`District_ID`)\\n)'}\n\n## User-Prompt:\nما هي المنتجات التي يكون لديها أقصى حجم للصفحة يساوي A4 أو عدد الصفحات باللون في الدقيقة أقل من 5؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product FROM product WHERE max_page_size = \"A4\" OR pages_per_minute_color < 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Title\" text,\\n\"Studio\" text,\\n\"Director\" text,\\n\"Gross_in_dollar\" int,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"Country\" text,\\n\"Number_cities\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'film_market_estimation': 'CREATE TABLE \"film_market_estimation\" (\\n\"Estimation_ID\" int,\\n\"Low_Estimate\" real,\\n\"High_Estimate\" real,\\n\"Film_ID\" int,\\n\"Type\" text,\\n\"Market_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Estimation_ID\"),\\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\\n)'}\n\n## User-Prompt:\nما هي مخرجي الأفلام المختلفين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT Director FROM film\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'works_on': 'CREATE TABLE works_on(\\nEssn INTEGER,\\nPno INTEGER,\\nHours REAL,\\nPRIMARY KEY(Essn, Pno))', 'employee': 'CREATE TABLE employee(\\nFname TEXT,\\nMinit TEXT,\\nLname TEXT,\\nSsn INTEGER PRIMARY KEY,\\nBdate TEXT,\\nAddress TEXT,\\nSex TEXT,\\nSalary INTEGER,\\nSuper_ssn INTEGER, \\nDno INTEGER)', 'department': 'CREATE TABLE department(\\nDname TEXT,\\nDnumber INTEGER PRIMARY KEY,\\nMgr_ssn INTEGER,\\nMgr_start_date TEXT)', 'project': 'CREATE TABLE project(\\nPname Text,\\nPnumber INTEGER PRIMARY KEY,\\nPlocation TEXT,\\nDnum INTEGER)', 'dependent': 'CREATE TABLE dependent(\\nEssn INTEGER,\\nDependent_name TEXT,\\nSex TEXT,\\nBdate TEXT,\\nRelationship TEXT,\\nPRIMARY KEY(Essn, Dependent_name))', 'dept_locations': 'CREATE TABLE dept_locations(\\nDnumber INTEGER,\\nDlocation TEXT,\\nPRIMARY KEY(Dnumber, Dlocation))'}\n\n## User-Prompt:\nما هي أسماء العائلة والأسماء الشخصية للموظفين الذين يكسبون أكثر من 30000 في الراتب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT fname , lname FROM employee WHERE salary > 30000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nابحث عن رمز الموقع الذي يحتوي على أكبر عدد من الوثائق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nما هي أسماء المرضى الذين لا يتناولون دواء بروكراستين-إكس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nأي منطقة تسويق تحتوي على أكبر عدد من مجموعات ورش العمل الدرامية؟ أعطني رمز المنطقة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي معرّفات السائقين، الأسماء الأولى، وعدد السباقات لجميع السائقين الذين شاركوا على الأقل في سباقين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Restaurant': 'CREATE TABLE Restaurant (\\n ResID INTEGER PRIMARY KEY,\\n ResName VARCHAR(100),\\n Address VARCHAR(100),\\n Rating INTEGER\\n)', 'Type_Of_Restaurant': 'CREATE TABLE Type_Of_Restaurant (\\n ResID INTEGER,\\n ResTypeID INTEGER,\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID),\\n FOREIGN KEY(ResTypeID) REFERENCES Restaurant_Type(ResTypeID)\\n)', 'Restaurant_Type': 'CREATE TABLE Restaurant_Type (\\n ResTypeID INTEGER PRIMARY KEY,\\n ResTypeName VARCHAR(40),\\n ResTypeDescription VARCHAR(100)\\n)', 'Visits_Restaurant': 'CREATE TABLE Visits_Restaurant (\\n StuID INTEGER,\\n ResID INTEGER,\\n Time TIMESTAMP,\\n Spent FLOAT,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID)\\n)'}\n\n## User-Prompt:\nفي أي مدينة تعيش الطالبة ليندا سميث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Fname , Lname FROM Student WHERE Major = 600;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nمن هو المستثمر الذي قام بالاستثمار في أكبر عدد من رواد الأعمال؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو إجمالي وقت الدرس الذي قدمه الموظف الذي يحمل اسم جانيسا ولقب سوين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هو رقم هوية المدرسين الذين قاموا بتدريس صف في خريف عام 2009 ولكن لم يقوموا بتدريس في ربيع عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nما هو اسم المستند الذي تم الوصول إليه بأكبر عدد من المرات، بالإضافة إلى عدد مرات الوصول؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_name , access_count FROM documents ORDER BY document_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هو معرف المراجع الذي يتضمن اسمه كلمة مايك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rID FROM Reviewer WHERE name LIKE \"%Mike%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nما هو عدد الغرف لكل نوع من أنواع الأسرة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT bedType , count(*) FROM Rooms GROUP BY bedType;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي أسماء البنوك في ولاية نيويورك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT bname FROM bank WHERE state = 'New York'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nأي برنامج تم إطلاقه مؤخرًا بشكل أكبر؟ الرجاء إرجاع اسم البرنامج.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM program ORDER BY launch DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nما هو اسم الدواء الذي يتم استخدامه للمريض الذي يقيم في الغرفة 111؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر المتوسط ​​لعدد الغرف في الشقق التي لديها رمز حالة الحجز مؤقت.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي التسميات المختلفة للألبومات المدرجة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT label FROM Albums\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هو أدنى عدد ساعات للطلاب الذين يلعبون في مراكز مختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nكم معلما يدرس الطالب المسمى CHRISSY NABOZNY؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"TARRING\" AND T2.lastname = \"LEIA\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي أسماء المدارس التي لديها بعض الطلاب يلعبون في مركز حارس المرمى ووسط الملعب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nاعثر على الاسم ورصيد الفحص للحساب الذي يحمل أدنى رصيد للادخار.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أوضاع اللاعبين الذين يكون متوسط عدد النقاط المُسجَّلة من قبل تلك الوضع أكبر من 20؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT POSITION FROM player GROUP BY name HAVING avg(Points) >= 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء الخمسة الذين قاموا بشراء شيء مؤخرًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على اسم وراتب المدرسين الذين يشرفون على الطلاب من قسم الرياضيات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'building': 'CREATE TABLE \"building\" (\\n\"building_id\" text,\\n\"Name\" text,\\n\"Street_address\" text,\\n\"Years_as_tallest\" text,\\n\"Height_feet\" int,\\n\"Floors\" int,\\nPRIMARY KEY(\"building_id\")\\n)', 'Institution': 'CREATE TABLE \"Institution\" (\\n\"Institution_id\" text,\\n\"Institution\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Type\" text,\\n\"Enrollment\" int,\\n\"Team\" text,\\n\"Primary_Conference\" text,\\n\"building_id\" text,\\nPRIMARY KEY(\"Institution_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"building\"(\"building_id\")\\n)', 'protein': 'CREATE TABLE \"protein\" (\\n\"common_name\" text,\\n\"protein_name\" text,\\n\"divergence_from_human_lineage\" real,\\n\"accession_number\" text,\\n\"sequence_length\" real,\\n\"sequence_identity_to_human_protein\" text,\\n\"Institution_id\" text,\\nPRIMARY KEY(\"common_name\"),\\nFOREIGN KEY(\"Institution_id\") REFERENCES \"Institution\"(\"Institution_id\")\\n)'}\n\n## User-Prompt:\nأظهر أنواع المؤسسات، جنبًا إلى جنب مع عدد المؤسسات والتسجيل الإجمالي لكل نوع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE , count(*) , sum(enrollment) FROM institution GROUP BY TYPE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي الأغنية التي تحتوي على أكبر عدد من الأصوات الغنائية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي جميع المعلومات عن الموظفين الذين يحتوون على الحروف D أو S في اسمهم الأول، مرتبة ترتيبًا بترتيب تنازلي حسب الراتب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'candidate': 'CREATE TABLE \"candidate\" (\\n\"Candidate_ID\" int,\\n\"People_ID\" int,\\n\"Poll_Source\" text,\\n\"Date\" text,\\n\"Support_rate\" real,\\n\"Consider_rate\" real,\\n\"Oppose_rate\" real,\\n\"Unsure_rate\" real,\\nPRIMARY KEY (\"Candidate_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Sex\" text,\\n\"Name\" text,\\n\"Date_of_Birth\" text,\\n\"Height\" real,\\n\"Weight\" real,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هو اسم الأشخاص الذين يكون طولهم أقل من المتوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأعط معرّفات الطلب لجميع الطلبات، بالإضافة إلى الكمية الإجمالية للمنتجات في كل منها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو اسم شركة الطيران التي لديها أكبر عدد من الطرق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n \"People_ID\" int,\\n \"Age\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Graduation_College\" text,\\n PRIMARY KEY (\"People_ID\")\\n)', 'company': 'CREATE TABLE \"company\" (\\n \"Company_ID\" real,\\n \"Name\" text,\\n \"Headquarters\" text,\\n \"Industry\" text,\\n \"Sales_in_Billion\" real,\\n \"Profits_in_Billion\" real,\\n \"Assets_in_Billion\" real,\\n \"Market_Value_in_Billion\" real,\\n PRIMARY KEY (\"Company_ID\")\\n)', 'employment': 'CREATE TABLE \"employment\" (\\n \"Company_ID\" int,\\n \"People_ID\" int,\\n \"Year_working\" int,\\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nكم فيلم هناك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nأظهر نطاقات الأسعار للفنادق ذات التقييمات الخمس نجوم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Tourist_Details FROM VISITORS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هو متوسط العمر لكل جنس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Person WHERE age > 30 AND job = 'engineer'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nمن بين جميع اللاعبين الذين لديهم تقييم عام أكبر من 80، كم عدد الذين يستخدمون القدم اليمنى والقدم اليسرى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT preferred_foot , count(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن الاسم الأول للطلاب الذين يعيشون في المسكن الذي يحتوي على أكبر عدد من الخدمات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'medicine': 'CREATE TABLE \"medicine\" (\\n\"id\" int,\\n\"name\" text,\\n\"Trade_Name\" text,\\n\"FDA_approved\" text,\\nprimary key (\"id\")\\n)', 'enzyme': 'CREATE TABLE \"enzyme\" (\\n\"id\" int,\\n\"name\" text,\\n\"Location\" text,\\n\"Product\" text,\\n\"Chromosome\" text,\\n\"OMIM\" int,\\n\"Porphyria\" text,\\nprimary key (\"id\")\\n)', 'medicine_enzyme_interaction': 'CREATE TABLE \"medicine_enzyme_interaction\" (\\n\"enzyme_id\" int,\\n\"medicine_id\" int,\\n\"interaction_type\" text,\\nprimary key (\"enzyme_id\", \"medicine_id\"),\\nforeign key (\"enzyme_id\") references `enzyme`(\"id\"),\\nforeign key (\"medicine_id\") references `medicine`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أسماء وأسماء التجارية للأدوية التي لها قيمة 'نعم' في سجل إدارة الغذاء والدواء (FDA)؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , trade_name FROM medicine WHERE FDA_approved = 'Yes'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nكم عدد الغرف في كل مبنى تتسع لأكثر من 50 شخصًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , building FROM classroom WHERE capacity > 50 GROUP BY building\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي أسماء وساعات التدريب لكل طالب حصل على قبول في التجربة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنانين الذين تجذب معارضهم أكثر من 200 زائر في المتوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nأعد أسماء الأولى لـ 5 أعضاء في الفريق قاموا بمعالجة أكبر عدد من الشكاوى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nقائمة المؤلفين الذين لا يملكون تقديمات إلى أي ورشة عمل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Date , Venue FROM workshop ORDER BY Venue\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي المزرعة التي تم إنتاج النبيذ الذي حصل على أعلى تقييم فيها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Winery FROM WINE ORDER BY SCORE LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفرق التي ليس لديها سجل في مواسم المباريات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nما هي الاسم الأول، والاسم الأخير، ورقم الهاتف لجميع أعضاء هيئة التدريس الإناث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى لجميع المدرسين الذين قاموا بتدريس دورة والأوصاف المقابلة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هي أماكن الجذب السياحي التي يمكننا الوصول إليها بواسطة الحافلة؟ أخبرني عن أسماء الأماكن.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'manufacturer': 'CREATE TABLE \"manufacturer\" (\\n \"Manufacturer_ID\" int,\\n \"Open_Year\" real,\\n \"Name\" text,\\n \"Num_of_Factories\" int,\\n \"Num_of_Shops\" int,\\n PRIMARY KEY (\"Manufacturer_ID\")\\n)', 'furniture': 'CREATE TABLE \"furniture\" (\\n \"Furniture_ID\" int,\\n \"Name\" text,\\n \"Num_of_Component\" int,\\n \"Market_Rate\" real,\\n PRIMARY KEY (\"Furniture_ID\")\\n)', 'furniture_manufacte': 'CREATE TABLE \"furniture_manufacte\" (\\n \"Manufacturer_ID\" int,\\n \"Furniture_ID\" int,\\n \"Price_in_Dollar\" real,\\n PRIMARY KEY (\"Manufacturer_ID\",\"Furniture_ID\"),\\n FOREIGN KEY (\"Manufacturer_ID\") REFERENCES `manufacturer`(\"Manufacturer_ID\"),\\n FOREIGN KEY (\"Furniture_ID\") REFERENCES `furniture`(\"Furniture_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن القيمة السوقية الإجمالية للأثاث الذي يمتلك أعلى حصتين في السوق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي عناوين جميع الألبومات ترتيبًا ألفبائيًا بالتصاعدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM albums ORDER BY title;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nأي أغنية تحتوي على أكبر عدد من الأصوات الغنائية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر تواريخ البداية وتواريخ الانتهاء لجميع حجوزات الشقق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT booking_start_date , booking_end_date FROM Apartment_Bookings\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nأظهر لي الفصول الدراسية التي يستخدمها الصف الخامس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT classroom FROM list WHERE grade = 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو معرف وراتب الموظف المسمى مارك يونج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT eid , salary FROM Employee WHERE name = 'Mark Young'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هي تفاصيل جميع المنظمات التي يتم وصفها بأنها الراعي؟ وقم بترتيب النتائج بترتيب تصاعدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nالعثور على الأسماء الأولية والأسماء الأخيرة للطلاب ونقاط الدرجات لجميع التسجيلات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = \"INTRODUCTION TO COMPUTER SCIENCE\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nهل يمكنك سرد أسماء جميع العلماء، أسماء مشاريعهم، وعدد الساعات التي عملها كل عالم في كل مشروع، وذلك مرتبة ترتيباً أبجدياً حسب اسم المشروع، ثم اسم العالم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nابحث عن اسم وعنوان البريد الإلكتروني للمستخدمين الذين لديهم أكثر من 1000 متابع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , email FROM user_profiles WHERE followers > 1000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هو عنوان الفيلم وسعر الإيجار للفيلم الذي يمتلك أعلى سعر إيجار؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو رقم هاتف نانسي إدواردز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT phone FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nما هو اسم العائلة للشخص الذي تم الاتصال به مؤخرًا من هيئة Labour Party؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد فعاليات الاجتماع السنوي التي حدثت في منطقة المملكة المتحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'pilot': 'CREATE TABLE `pilot` (\\n `Pilot_Id` int(11) NOT NULL,\\n `Name` varchar(50) NOT NULL,\\n `Age` int(11) NOT NULL,\\n PRIMARY KEY (`Pilot_Id`)\\n)', 'aircraft': 'CREATE TABLE `aircraft` (\\n \"Aircraft_ID\" int(11) NOT NULL,\\n \"Aircraft\" varchar(50) NOT NULL,\\n \"Description\" varchar(50) NOT NULL,\\n \"Max_Gross_Weight\" varchar(50) NOT NULL,\\n \"Total_disk_area\" varchar(50) NOT NULL,\\n \"Max_disk_Loading\" varchar(50) NOT NULL,\\n PRIMARY KEY (`Aircraft_ID`)\\n)', 'match': 'CREATE TABLE `match` (\\n\"Round\" real,\\n\"Location\" text,\\n\"Country\" text,\\n\"Date\" text,\\n\"Fastest_Qualifying\" text,\\n\"Winning_Pilot\" text,\\n\"Winning_Aircraft\" text,\\nPRIMARY KEY (\"Round\"),\\nFOREIGN KEY (`Winning_Aircraft`) REFERENCES `aircraft`(`Aircraft_ID`),\\nFOREIGN KEY (`Winning_Pilot`) REFERENCES `pilot`(`Pilot_Id`)\\n)', 'airport': 'CREATE TABLE `airport` (\\n\"Airport_ID\" int,\\n\"Airport_Name\" text,\\n\"Total_Passengers\" real,\\n\"%_Change_2007\" text,\\n\"International_Passengers\" real,\\n\"Domestic_Passengers\" real,\\n\"Transit_Passengers\" real,\\n\"Aircraft_Movements\" real,\\n\"Freight_Metric_Tonnes\" real,\\nPRIMARY KEY (\"Airport_ID\")\\n)', 'airport_aircraft': 'CREATE TABLE `airport_aircraft` (\\n\"ID\" int,\\n\"Airport_ID\" int,\\n\"Aircraft_ID\" int,\\nPRIMARY KEY (\"Airport_ID\",\"Aircraft_ID\"),\\nFOREIGN KEY (\"Airport_ID\") REFERENCES `airport`(`Airport_ID`),\\nFOREIGN KEY (\"Aircraft_ID\") REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nسرد أسماء الطائرات وعدد المرات التي فازت بها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nأظهر أسماء الأعضاء الذين هم في الحزب رقم 3 والحزب رقم 1.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول لجميع الموظفين الذين لا يقدمون أي دروس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هو الفريق الذي يحتوي على ما لا يقل عن 2 فنيين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nكم عدد الفرق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هي الولاية والبلد لجميع المدن التي لديها رموز بريدية تبدأ بالرقم 4؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT city FROM addresses WHERE zip_postcode = 255\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأظهر جميع معرف الطالب الذين تتجاوز أعمارهم 20 عامًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Student WHERE age > 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nاعثر على الاسم وإجمالي رصيد الفحص والادخار للحسابات التي يكون رصيدها الادخار أقل من رصيد الفحص المقابل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة لجميع المرشحين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب الذين يعيشون في HKG أو CHI؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nكم عدد المنتجات التي لم تُدرج في أي طلب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Party_Theme\" text,\\n\"Location\" text,\\n\"First_year\" text,\\n\"Last_year\" text,\\n\"Number_of_hosts\" int,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'host': 'CREATE TABLE \"host\" (\\n\"Host_ID\" int,\\n\"Name\" text,\\n\"Nationality\" text,\\n\"Age\" text,\\nPRIMARY KEY (\"Host_ID\")\\n)', 'party_host': 'CREATE TABLE \"party_host\" (\\n\"Party_ID\" int,\\n\"Host_ID\" int,\\n\"Is_Main_in_Charge\" bool,\\nPRIMARY KEY (\"Party_ID\",\"Host_ID\"),\\nFOREIGN KEY (\"Host_ID\") REFERENCES `host`(\"Host_ID\"),\\nFOREIGN KEY (\"Party_ID\") REFERENCES `party`(\"Party_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد الحفلات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM party\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nما هم المخرجون الذين كان لديهم فيلم في عامي 1999 و 2000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nقل لي رموز الكتل المتميزة حيث تتوفر بعض الغرف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT blockcode FROM room WHERE unavailable = 0\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE \"station\" (\\n\"Station_ID\" int,\\n\"Name\" text,\\n\"Annual_entry_exit\" real,\\n\"Annual_interchanges\" real,\\n\"Total_Passengers\" real,\\n\"Location\" text,\\n\"Main_Services\" text,\\n\"Number_of_Platforms\" int,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Name\" text,\\n\"Time\" text,\\n\"Service\" text,\\nPRIMARY KEY (\"Train_ID\")\\n)', 'train_station': 'CREATE TABLE \"train_station\" (\\n\"Train_ID\" int,\\n\"Station_ID\" int,\\t\\nPRIMARY KEY (\"Train_ID\",\"Station_ID\"),\\nFOREIGN KEY (\"Train_ID\") REFERENCES \"train\"(\"Train_ID\"),\\nFOREIGN KEY (\"Station_ID\") REFERENCES \"station\"(\"Station_ID\")\\n)'}\n\n## User-Prompt:\nما هو العدد المتوسط والعدد الأقصى للركاب الكليين لمحطات القطار في لندن أو غلاسكو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , main_services FROM station ORDER BY total_passengers DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Address\" text,\\n\"Num_of_staff\" text,\\n\"Score\" real,\\n\"Open_Year\" text,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Membership_card\" text,\\n\"Age\" int,\\n\"Time_of_purchase\" int,\\n\"Level_of_membership\" int,\\n\"Address\" text,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'happy_hour': 'CREATE TABLE \"happy_hour\" (\\n\"HH_ID\" int,\\n\"Shop_ID\" int,\\n\"Month\" text,\\n\"Num_of_shaff_in_charge\" int,\\nPRIMARY KEY (\"HH_ID\",\"Shop_ID\",\"Month\"),\\nFOREIGN KEY (\"Shop_ID\") REFERENCES `shop`(\"Shop_ID\")\\n)', 'happy_hour_member': 'CREATE TABLE \"happy_hour_member\" (\\n\"HH_ID\" int,\\n\"Member_ID\" int,\\n\"Total_amount\" real,\\nPRIMARY KEY (\"HH_ID\",\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nاعثر على عدد الأعضاء الذين يعيشون في كل عنوان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , address FROM member GROUP BY address\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو عنوان الموظف نانسي إدواردز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT address FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nما هي رتب القباطنة الذين ليس لديهم أي قبطان في فئة السفينة من الخط الثالث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'medicine': 'CREATE TABLE \"medicine\" (\\n\"id\" int,\\n\"name\" text,\\n\"Trade_Name\" text,\\n\"FDA_approved\" text,\\nprimary key (\"id\")\\n)', 'enzyme': 'CREATE TABLE \"enzyme\" (\\n\"id\" int,\\n\"name\" text,\\n\"Location\" text,\\n\"Product\" text,\\n\"Chromosome\" text,\\n\"OMIM\" int,\\n\"Porphyria\" text,\\nprimary key (\"id\")\\n)', 'medicine_enzyme_interaction': 'CREATE TABLE \"medicine_enzyme_interaction\" (\\n\"enzyme_id\" int,\\n\"medicine_id\" int,\\n\"interaction_type\" text,\\nprimary key (\"enzyme_id\", \"medicine_id\"),\\nforeign key (\"enzyme_id\") references `enzyme`(\"id\"),\\nforeign key (\"medicine_id\") references `medicine`(\"id\")\\n)'}\n\n## User-Prompt:\nما هو نوع التفاعل للإنزيم المسمى 'ALA synthase' والدواء المسمى 'Aripiprazole'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هي أسماء المساكن التي لا تحتوي على صالة تلفزيون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nابحث عن عدد المقطوعات في كل نوع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول والمكتب للأستاذ الذي ينتمي إلى قسم التاريخ ويمتلك درجة الدكتوراه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.dept_name , T2.dept_address , count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هو الوصف الكامل لدور الباحث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nكم عدد الولايات التي بها كلية لديها عدد طلاب أكبر من المتوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nكم عدد أنواع المستندات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Ref_document_types\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nفي أي ولاية قد تكون العنوان '6862 Kaitlyn Knolls'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nما هو اسم الغرفة التي يمكن أن تستوعب أكبر عدد من الأشخاص؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nابحث عن الاسم الأول والعائلي لجميع المعلمين الذين يدرسون EVELINA BROMLEY.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"MARROTTE\" AND T2.lastname = \"KIRK\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو اسم والمتوسط لمعدل النجاح للقسم الذي لديه أعلى متوسط لمعدل النجاح؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(stu_gpa) , avg(stu_gpa) , min(stu_gpa) , dept_code FROM student GROUP BY dept_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nما هي أسماء ومقرات جميع الشركات المصنعة، مرتبة حسب الإيرادات تنازليًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , headquarter FROM manufacturers ORDER BY revenue DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nأظهر أسماء جميع الموظفين ذوي الدور HR.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_ID FROM Employees WHERE employee_name = \"Ebba\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هي الأسماء وأرقام الهواتف لجميع الموردين، مرتبة ترتيباً أبجدياً لعناوينهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nما هي معرفات المنتجات المميزة للطلبات التي تم تقديمها بين تاريخي 1975-01-01 و 1976-01-01؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nعدد فروع البنك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM bank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nأي حرم جامعي تم فتحه بين عامي ١٩٣٥ و ١٩٣٩؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campus FROM campuses WHERE YEAR < 1800\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nسجل أسماء وجنسيات ومعرفات جميع المهندسين المعماريين الذكور مرتبين ترتيباً لغوياً حسب أسمائهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nما هي أعلى ثلاثة أنواع شقق من حيث متوسط عدد الغرف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأعط أسماء وتفاصيل وأنواع البيانات للخصائص التي لم يتم العثور عليها في أي منتج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هو متوسط ​​درجة الائتمان للعملاء الذين لديهم بعض القروض؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nكم عدد الطلاب الذين حصلوا على درجة B واحدة على الأقل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = \"B\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nعرض وصف الدور ومعرف موظف المشروع المشارك في أكبر عدد من نتائج المشروع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي أنواع ألعاب الفيديو وكمية كل نوع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT gtype , count(*) FROM Video_games GROUP BY gtype\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nقم بسرد أسماء الموظفين الذين أذنوا بتدمير الوثائق والموظفين الذين قاموا بتدمير الوثائق المقابلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأعط المدينة التي يعيش فيها الطالب الذي يحمل اسم العائلة Kim.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT city_code FROM Student WHERE LName = \"Kim\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nما هي عناوين مؤلفي الدورة الذين يدرسون إما نظام التشغيل أو هيكل البيانات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"operating system\" OR T2.course_name = \"data structure\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nمن هم أصدقاء بوب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nمن هو مشرف ليندا سميث؟ أعطني الاسم الأول والاسم الأخير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هو اسم ونقطة الائتمان للعملاء الذين لديهم بعض القروض؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nالعثور على عدد الفرق الرياضية التي هي نشطة (تحتوي على 'Y' كمعلومات 'active').\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM team_franchise WHERE active = 'Y';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nأذكر أسماء الغرف التي تحتوي على سرير ملكي أو سرير ملكة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"City\" text,\\n\"Hanzi\" text,\\n\"Hanyu_Pinyin\" text,\\n\"Regional_Population\" int,\\n\"GDP\" real,\\nPRIMARY KEY (\"City_ID\")\\n)', 'match': 'CREATE TABLE \"match\" (\\n\"Match_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Score\" text,\\n\"Result\" text,\\n\"Competition\" text,\\nPRIMARY KEY (\"Match_ID\")\\n)', 'temperature': 'CREATE TABLE \"temperature\" (\\n\"City_ID\" int,\\n\"Jan\" real,\\n\"Feb\" real,\\n\"Mar\" real,\\n\"Apr\" real,\\n\"Jun\" real,\\n\"Jul\" real,\\n\"Aug\" real,\\n\"Sep\" real,\\n\"Oct\" real,\\n\"Nov\" real,\\n\"Dec\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)\\n)', 'hosting_city': 'CREATE TABLE \"hosting_city\" (\\n \"Year\" int,\\n \"Match_ID\" int,\\n \"Host_City\" text,\\n PRIMARY KEY (\"Year\"),\\n FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),\\n FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)\\n)'}\n\n## User-Prompt:\nأي المدن تسجل درجات حرارة أقل في مارس منها في ديسمبر ولم تكون مدناً مضيفة أبدًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nهلما تعرض جميع الناشرين الذين ليس لديهم كتاب في عام 1989؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nقائمة بأسماء جميع القنوات مرتبة حسب تصنيفها بالنسبة المئوية من الأكبر إلى الأصغر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM channel WHERE OWNER != 'CCTV'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nارجع أفلام القضاء للمصارعين في فريق Orton.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Elimination_Move FROM Elimination WHERE Team = \"Team Orton\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nأعط المتوسط ​​لكمية الأسهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Quantity) FROM stock\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customer_Master_Index': 'CREATE TABLE Customer_Master_Index (\\nmaster_customer_id INTEGER NOT NULL,\\ncmi_details VARCHAR(255),\\nPRIMARY KEY (master_customer_id)\\n)', 'CMI_Cross_References': 'CREATE TABLE CMI_Cross_References (\\ncmi_cross_ref_id INTEGER NOT NULL,\\nmaster_customer_id INTEGER NOT NULL,\\nsource_system_code CHAR(15) NOT NULL,\\nPRIMARY KEY (cmi_cross_ref_id),\\nFOREIGN KEY (master_customer_id) REFERENCES Customer_Master_Index (master_customer_id)\\n\\n)', 'Council_Tax': 'CREATE TABLE Council_Tax (\\ncouncil_tax_id INTEGER NOT NULL,\\ncmi_cross_ref_id INTEGER NOT NULL,\\nPRIMARY KEY (council_tax_id),\\nFOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)\\n)', 'Business_Rates': 'CREATE TABLE Business_Rates (\\nbusiness_rates_id INTEGER NOT NULL,\\ncmi_cross_ref_id INTEGER NOT NULL,\\nPRIMARY KEY (business_rates_id),\\nFOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)\\n)', 'Benefits_Overpayments': 'CREATE TABLE Benefits_Overpayments (\\ncouncil_tax_id INTEGER NOT NULL,\\ncmi_cross_ref_id INTEGER NOT NULL,\\nPRIMARY KEY (council_tax_id),\\nFOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)\\n)', 'Parking_Fines': 'CREATE TABLE Parking_Fines (\\ncouncil_tax_id INTEGER NOT NULL,\\ncmi_cross_ref_id INTEGER NOT NULL,\\nPRIMARY KEY (council_tax_id),\\nFOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)\\n)', 'Rent_Arrears': 'CREATE TABLE Rent_Arrears (\\ncouncil_tax_id INTEGER NOT NULL,\\ncmi_cross_ref_id INTEGER NOT NULL,\\nPRIMARY KEY (council_tax_id),\\nFOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)\\n)', 'Electoral_Register': 'CREATE TABLE Electoral_Register (\\nelectoral_register_id INTEGER NOT NULL,\\ncmi_cross_ref_id INTEGER NOT NULL,\\nPRIMARY KEY (electoral_register_id),\\nFOREIGN KEY (cmi_cross_ref_id) REFERENCES CMI_Cross_References (cmi_cross_ref_id)\\n)'}\n\n## User-Prompt:\nأي رقم مرجعي متقاطع لـ CMI ليس مرتبطًا بأي ضريبة على وقوف السيارات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هو اسم فرع البنك الذي قدم أكبر مبلغ إجمالي في القروض، بالضبط للعملاء الذين يمتلكون درجات ائتمان أقل من 100؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء المدارس مع مبلغ ميزانية إجمالي أكبر من 100 أو تبرع إجمالي أكبر من 10.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted) > 100 OR sum(T3.amount) > 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nهل يمكنك العثور على رقم الضمان الاجتماعي (SSN) واسم العلماء الذين تم تعيينهم في المشروع الذي يستغرق أطول وقت؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Customer_Policies': 'CREATE TABLE Customer_Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATE,\\nEnd_Date DATE,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nPRIMARY KEY (Claim_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Customer_Policies (Policy_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nCustomer_Policy_ID INTEGER NOT NULL,\\nPRIMARY KEY (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)', 'Payments': 'CREATE TABLE Payments (\\nPayment_ID INTEGER NOT NULL,\\nSettlement_ID INTEGER NOT NULL,\\nPayment_Method_Code VARCHAR(255),\\nDate_Payment_Made DATE,\\nAmount_Payment INTEGER,\\nPRIMARY KEY (Payment_ID),\\nFOREIGN KEY (Settlement_ID) REFERENCES Settlements (Settlement_ID)\\n)'}\n\n## User-Prompt:\nما هو إجمالي مبلغ الدفع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nكم عدد الموظفين لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Employee\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هي أسماء الإناث اللواتي هن صديقات مع زاك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'medicine': 'CREATE TABLE \"medicine\" (\\n\"id\" int,\\n\"name\" text,\\n\"Trade_Name\" text,\\n\"FDA_approved\" text,\\nprimary key (\"id\")\\n)', 'enzyme': 'CREATE TABLE \"enzyme\" (\\n\"id\" int,\\n\"name\" text,\\n\"Location\" text,\\n\"Product\" text,\\n\"Chromosome\" text,\\n\"OMIM\" int,\\n\"Porphyria\" text,\\nprimary key (\"id\")\\n)', 'medicine_enzyme_interaction': 'CREATE TABLE \"medicine_enzyme_interaction\" (\\n\"enzyme_id\" int,\\n\"medicine_id\" int,\\n\"interaction_type\" text,\\nprimary key (\"enzyme_id\", \"medicine_id\"),\\nforeign key (\"enzyme_id\") references `enzyme`(\"id\"),\\nforeign key (\"medicine_id\") references `medicine`(\"id\")\\n)'}\n\n## User-Prompt:\nعرض أسماء الأدوية وأسماء التجارية التي لا يمكن أن تتفاعل مع الإنزيم الذي يحتوي على منتج 'هيم'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nما هي أسماء الطلاب جميعاً؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM student\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي أسماء المراجعين الذين قدموا تقييمات تزيد عن 3 نجوم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nكم حدث حزب لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM party_events\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Customer_Policies': 'CREATE TABLE Customer_Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATE,\\nEnd_Date DATE,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nPRIMARY KEY (Claim_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Customer_Policies (Policy_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nCustomer_Policy_ID INTEGER NOT NULL,\\nPRIMARY KEY (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)', 'Payments': 'CREATE TABLE Payments (\\nPayment_ID INTEGER NOT NULL,\\nSettlement_ID INTEGER NOT NULL,\\nPayment_Method_Code VARCHAR(255),\\nDate_Payment_Made DATE,\\nAmount_Payment INTEGER,\\nPRIMARY KEY (Payment_ID),\\nFOREIGN KEY (Settlement_ID) REFERENCES Settlements (Settlement_ID)\\n)'}\n\n## User-Prompt:\nابحث عن الإجمالي للمبلغ المطالب به في جميع الطلبات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء البلدان التي تحتوي على أكثر من أفعوانية واحدة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name , T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هي أعمار جميع أصدقاء زاك الذين يمتلكون أطول علاقة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'college': 'CREATE TABLE \"college\" (\\n\"College_ID\" int,\\n\"Name\" text,\\n\"Leader_Name\" text,\\n\"College_Location\" text,\\nPRIMARY KEY (\"College_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"College_ID\" int,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"College_ID\") REFERENCES `college`(\"College_ID\")\\n)', 'round': 'CREATE TABLE \"round\" (\\n\"Round_ID\" int,\\n\"Member_ID\" int,\\n\"Decoration_Theme\" text,\\n\"Rank_in_Round\" int,\\nPRIMARY KEY (\"Member_ID\",\"Round_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع المستندات، بالإضافة إلى عدد الوصولات لكل منها، مرتبة أبجديًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'architect': 'CREATE TABLE \"architect\" (\\n\"id\" text,\\n\"name\" text,\\n\"nationality\" text,\\n\"gender\" text,\\nprimary key(\"id\")\\n)', 'bridge': 'CREATE TABLE \"bridge\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"name\" text,\\n\"location\" text,\\n\"length_meters\" real,\\n\"length_feet\" real,\\nprimary key(\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)', 'mill': 'CREATE TABLE \"mill\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"location\" text,\\n\"name\" text,\\n\"type\" text,\\n\"built_year\" int,\\n\"notes\" text,\\nprimary key (\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)'}\n\n## User-Prompt:\nأي من أسماء المطاحن يحتوي على كلمة 'Moulin' الفرنسية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 2 UNION SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nكم عدد الشركات في صناعة البنوك أو صناعة المجمعات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Companies WHERE Industry = \"Banking\" OR Industry = \"Conglomerate\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'festival_detail': 'CREATE TABLE \"festival_detail\" (\\n\"Festival_ID\" int,\\n\"Festival_Name\" text,\\n\"Chair_Name\" text,\\n\"Location\" text,\\n\"Year\" int,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Festival_ID\")\\n)', 'artwork': 'CREATE TABLE artwork (\\n\"Artwork_ID\" int,\\n\"Type\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Artwork_ID\")\\n)', 'nomination': 'CREATE TABLE nomination (\\n\"Artwork_ID\" int,\\n\"Festival_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Artwork_ID\",\"Festival_ID\"),\\nFOREIGN KEY (\"Artwork_ID\") REFERENCES `artwork`(\"Artwork_ID\"),\\nFOREIGN KEY (\"Festival_ID\") REFERENCES `festival_detail`(\"Festival_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء رؤساء المهرجانات، مرتبة بترتيب تصاعدي حسب السنة التي عقدت فيها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Festival_Name , LOCATION FROM festival_detail\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nابحث عن أسماء الولايات التي لديها بعض الطلاب في الكليات يلعبون في مركز حارس المرمى ووسط الملعب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأي الضيوف لديهم حجوزات شقق برمز حالة مؤكد؟ أرجع أسماء الضيوف الأولية وأسماء العائلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Confirmed\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هو تقييم النجوم المتوسط لكل فيلم غير المراجع من قبل بريتاني هاريس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nاعثر على التسجيل الطلابي الإجمالي لمختلف أنواع الانتماءات للمدارس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nما هو عدد المدارس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM school\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nمن الطلاب الذين يعيشون في المدينة التي تحمل الرمز NYC ولديهم تصويت لعضو في مجلس الطلاب في دورة الانتخابات الربيعية؟ عدد الطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nأي ولاية لديها أكبر عدد من الزبائن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nمن هم اللاعبون المختلفون، وفي أي موسم يلعبون، وما هو اسم الفريق الذي ينتمون إليه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nعدد الخدمات هو كم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM services\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو اسم المطار الذي يعد وجهة لأكبر عدد من الطرق التي تنطلق من الصين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nما هي تفاصيل جميع المبيعات والمشتريات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأعمار لجميع الطلاب الذين يلعبون كرة القدم ولكروس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = \"Football\" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = \"Lacrosse\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nإرجاع أسماء ومعرفات جميع المنتجات التي تتراوح أسعارها بين 600 و 700.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هو متوسط ساعات التدريب لجميع اللاعبين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM College WHERE enr > 15000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن عدد المساكن والسعة الإجمالية لكل جنس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nفي كم مدينة مختلفة توجد البنوك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT city) FROM bank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة للأشخاص الذين دفعوا أكثر من أسعار الغرف الأساسية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nابحث عن عدد وصفات المرضى التي قام الطبيب جون دوريان بإعدادها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = \"John Dorian\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء وبلدان أصل الفنانين الذين أنتجوا أعلى ثلاث أغاني مصنفة بتقييم عالٍ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنيين وسلاسل الآلات التي يقومون بإصلاحها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'publication': 'CREATE TABLE \"publication\" (\\n\"Publication_ID\" int,\\n\"Book_ID\" int,\\n\"Publisher\" text,\\n\"Publication_Date\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Publication_ID\"),\\nFOREIGN KEY (\"Book_ID\") REFERENCES \"book\"(\"Book_ID\")\\n)', 'book': 'CREATE TABLE \"book\" (\\n\"Book_ID\" int,\\n\"Title\" text,\\n\"Issues\" real,\\n\"Writer\" text,\\nPRIMARY KEY (\"Book_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بعناوين الكتب بترتيب تصاعدي حسب الإصدارات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Title FROM book ORDER BY Issues ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nما هي فئة السباق ذات أكبر عدد من السباقات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أسماء ووصف الدورات التي تنتمي إلى الموضوع المسمى علوم الحاسوب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nلكل رمز حالة للعملاء، كم عدد العملاء المصنفين بهذه الطريقة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"City\" text,\\n\"Hanzi\" text,\\n\"Hanyu_Pinyin\" text,\\n\"Regional_Population\" int,\\n\"GDP\" real,\\nPRIMARY KEY (\"City_ID\")\\n)', 'match': 'CREATE TABLE \"match\" (\\n\"Match_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Score\" text,\\n\"Result\" text,\\n\"Competition\" text,\\nPRIMARY KEY (\"Match_ID\")\\n)', 'temperature': 'CREATE TABLE \"temperature\" (\\n\"City_ID\" int,\\n\"Jan\" real,\\n\"Feb\" real,\\n\"Mar\" real,\\n\"Apr\" real,\\n\"Jun\" real,\\n\"Jul\" real,\\n\"Aug\" real,\\n\"Sep\" real,\\n\"Oct\" real,\\n\"Nov\" real,\\n\"Dec\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)\\n)', 'hosting_city': 'CREATE TABLE \"hosting_city\" (\\n \"Year\" int,\\n \"Match_ID\" int,\\n \"Host_City\" text,\\n PRIMARY KEY (\"Year\"),\\n FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),\\n FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن الناتج المحلي الإجمالي للمدينة ذات أكبر تعداد سكان إقليمي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nما هو الناشر الذي قام بنشر أكبر عدد من الكتب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nأظهر جميع هويات الطلاب مع عدد الرياضات وإجمالي عدد الألعاب التي تم لعبها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nاسترجاع تواريخ الفتح والإغلاق لجميع السياسات المرتبطة بالعميل الذي يحتوي اسمه على ديانا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.date_opened , t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE \"%Diana%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nعدد الألوان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM ref_colors\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nحساب عدد المواعيد التي تم إجراؤها بشكل إجمالي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM appointment\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أوضاع اللاعبين مع متوسط عدد النقاط المُسجَّلة من قبل اللاعبين في تلك الوضع أكبر من 20؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT POSITION , avg(Points) FROM player GROUP BY POSITION\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على أسماء المدرسين الذين لم يقوموا بتدريس أي دورات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'railway': 'CREATE TABLE \"railway\" (\\n\"Railway_ID\" int,\\n\"Railway\" text,\\n\"Builder\" text,\\n\"Built\" text,\\n\"Wheels\" text,\\n\"Location\" text,\\n\"ObjectNumber\" text,\\nPRIMARY KEY (\"Railway_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Train_Num\" text,\\n\"Name\" text,\\n\"From\" text,\\n\"Arrival\" text,\\n\"Railway_ID\" int,\\nPRIMARY KEY (\"Train_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES `railway`(\"Railway_ID\")\\n)', 'manager': 'CREATE TABLE \"manager\" (\\n\"Manager_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Working_year_starts\" text,\\n\"Age\" int,\\n\"Level\" int,\\nPRIMARY KEY (\"Manager_ID\")\\n)', 'railway_manage': 'CREATE TABLE \"railway_manage\" (\\n\"Railway_ID\" int,\\n\"Manager_ID\" int,\\n\"From_Year\" text,\\nPRIMARY KEY (\"Railway_ID\",\"Manager_ID\"),\\nFOREIGN KEY (\"Manager_ID\") REFERENCES \"manager\"(\"Manager_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES \"railway\"(\"Railway_ID\")\\n)'}\n\n## User-Prompt:\nما هو أقصى مستوى للمديرين في الدول التي ليست أستراليا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Wheels , LOCATION FROM railway\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nمن فضلك، أظهر الأشخاص الذين شغلوا منصب المراقب المالي أكثر عدد من المرات وعدد المرات المقابلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هو اسم العائلة للموسيقي الذي أنتج أكبر عدد من الأغاني؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nارجاع أسماء ومواقع المتاجر، مرتبة حسب الاسم بترتيب أبجدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو اسم السكن الذي يحتوي على كل من صالة التلفزيون وغرفة الدراسة كوسائل راحة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي أنواع الأصوات الغنائية المستخدمة في الأغنية بادلاندز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'festival_detail': 'CREATE TABLE \"festival_detail\" (\\n\"Festival_ID\" int,\\n\"Festival_Name\" text,\\n\"Chair_Name\" text,\\n\"Location\" text,\\n\"Year\" int,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Festival_ID\")\\n)', 'artwork': 'CREATE TABLE artwork (\\n\"Artwork_ID\" int,\\n\"Type\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Artwork_ID\")\\n)', 'nomination': 'CREATE TABLE nomination (\\n\"Artwork_ID\" int,\\n\"Festival_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Artwork_ID\",\"Festival_ID\"),\\nFOREIGN KEY (\"Artwork_ID\") REFERENCES `artwork`(\"Artwork_ID\"),\\nFOREIGN KEY (\"Festival_ID\") REFERENCES `festival_detail`(\"Festival_ID\")\\n)'}\n\n## User-Prompt:\nعرض أسماء أحدث ثلاث مهرجانات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Num_of_Audience) FROM festival_detail\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي أنواع الأصوات الغنائية المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT TYPE FROM vocals\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي السنوات المميزة التي لا يكون فيها نوع المسابقات بطولة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Competition_type , Country FROM competition\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هي معرفات وأسماء متاجر الأقسام التي تحتوي على كل من قسمي التسويق والإدارة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nمن هو صديق زاك الذي يمتلك أطول علاقة بالسنين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.name , T2.friend , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT avg(age) FROM person)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنيين الذين تم تعيينهم لإصلاح الآلات التي تحمل قيمة نقاط أكثر من 70؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو بلد المطار ذي الارتفاع الأعلى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM airports ORDER BY elevation DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nما هي أسماء الأولاد وأسماء العائلة لجميع الضيوف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT guest_first_name , guest_last_name FROM Guests\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nكم عدد أعضاء هيئة التدريس لدينا لكل رتبة هيئة تدريس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rank , count(*) FROM Faculty GROUP BY rank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هي تواريخ التسليم الفعلية للطلبات بكمية 1؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nابحث عن عناوين مؤلفي الدورة الذين يدرسون الدورة بأسماء نظام التشغيل أو هيكل البيانات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"advanced database\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mission': 'CREATE TABLE \"mission\" (\\n\"Mission_ID\" int,\\n\"Ship_ID\" int,\\n\"Code\" text,\\n\"Launched_Year\" int,\\n\"Location\" text,\\n\"Speed_knots\" int,\\n\"Fate\" text,\\nPRIMARY KEY (\"Mission_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES `ship`(\"Ship_ID\")\\n)', 'ship': 'CREATE TABLE \"ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Nationality\" text,\\n\"Tonnage\" int,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nلكل نوع، ما هي الحمولة المتوسطة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nما اسم المصارع الذي قضى أقل عدد من الأيام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي عناوين جميع الألبومات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM albums;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nما هو رقم الصف ورقم الفصل الدراسي لكل فصل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT firstname FROM list WHERE classroom = 107\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'railway': 'CREATE TABLE \"railway\" (\\n\"Railway_ID\" int,\\n\"Railway\" text,\\n\"Builder\" text,\\n\"Built\" text,\\n\"Wheels\" text,\\n\"Location\" text,\\n\"ObjectNumber\" text,\\nPRIMARY KEY (\"Railway_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Train_Num\" text,\\n\"Name\" text,\\n\"From\" text,\\n\"Arrival\" text,\\n\"Railway_ID\" int,\\nPRIMARY KEY (\"Train_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES `railway`(\"Railway_ID\")\\n)', 'manager': 'CREATE TABLE \"manager\" (\\n\"Manager_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Working_year_starts\" text,\\n\"Age\" int,\\n\"Level\" int,\\nPRIMARY KEY (\"Manager_ID\")\\n)', 'railway_manage': 'CREATE TABLE \"railway_manage\" (\\n\"Railway_ID\" int,\\n\"Manager_ID\" int,\\n\"From_Year\" text,\\nPRIMARY KEY (\"Railway_ID\",\"Manager_ID\"),\\nFOREIGN KEY (\"Manager_ID\") REFERENCES \"manager\"(\"Manager_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES \"railway\"(\"Railway_ID\")\\n)'}\n\n## User-Prompt:\nما هو العمر المتوسط لجميع المديرين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(LEVEL) FROM manager WHERE Country != \"Australia\t\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nكم عدد السائقين الذين لم يشاركوا في السباقات التي أقيمت في عام 2009؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هو رقم التعريف، الاسم الأول، واسم العائلة للسائق الذي كان في المركز الأول لوقت اللفة على الأقل مرتين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.driverid , T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هو عنوان الفيلم ومعرّف المخزون للعنصر الذي تم استئجاره بشكل أكثر تواترًا في المخزون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هي خطوط العرض والطول والمدينة للمحطة التي بدأت فيها الرحلة الأقصر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي جميع المقار التي لا تحتوي على شركة في صناعة البنوك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'journal': 'CREATE TABLE \"journal\" (\\n\"Journal_ID\" int,\\n\"Date\" text,\\n\"Theme\" text,\\n\"Sales\" int,\\nPRIMARY KEY (\"Journal_ID\")\\n)', 'editor': 'CREATE TABLE \"editor\" (\\n\"Editor_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\nPRIMARY KEY (\"Editor_ID\")\\n)', 'journal_committee': 'CREATE TABLE \"journal_committee\" (\\n\"Editor_ID\" int,\\n\"Journal_ID\" int,\\n\"Work_Type\" text,\\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد المحررين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM editor\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nكم طالبا يدرسهم LORIA ONDERSMA؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"GELL\" AND T1.lastname = \"TAMI\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي أسماء ورواتب الأقسام التي يتجاوز متوسط رواتبها 42000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dept_name , AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary) > 42000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nاعرض قائمة بالاسم الرسمي والحالة للمدينة ذات أعلى سكان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nأظهر متوسط نطاق الأسعار للفنادق التي تحمل تقييمًا بخمس نجوم وتسمح بالحيوانات الأليفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT price_range FROM HOTELS WHERE star_rating_code = \"5\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nسرّر كافة أسماء المستخدمين وكلمات المرور للمستخدمين ذوي الدور الأكثر شيوعًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولية والأسماء الأخيرة للطلاب الذين يدرسون تخصص فرعي في القسم الذي يحمل الرقم 140؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nأعد جميع اللاعبين مرتبة حسب الكلية بالترتيب الأبجدي التصاعدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT player FROM match_season ORDER BY College ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأرجع تفاصيل الكثير التابعة للمستثمرين الذين يمتلكون التفاصيل l.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT lot_details , investor_id FROM LOTS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nهلما تعرض أسماء جميع المخرجين الذين لديهم فيلم في كل من عام 1999 و 2000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو المدة المتوسطة بالمللي ثانية للمسارات التي تنتمي إلى النوع اللاتيني أو البوب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Latin\" OR T1.Name = \"Pop\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أنواع المستندات التي يوجد منها أكثر من 4 مستندات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسماء الدول وحجم الفاتورة المتوسط لأكبر الدول من حيث الحجم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nابحث عن أسماء المطارات التي يتراوح ارتفاعها بين -50 و 50.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM airlines WHERE name LIKE 'Orbit%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما عدد الجامعات التي تكون رسوم الحرم الجامعي لديها أكبر من متوسط رسوم الحرم الجامعي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND T2.year = 1996\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nعدد الألوان التي لم يتم استخدامها في أي منتج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'festival_detail': 'CREATE TABLE \"festival_detail\" (\\n\"Festival_ID\" int,\\n\"Festival_Name\" text,\\n\"Chair_Name\" text,\\n\"Location\" text,\\n\"Year\" int,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Festival_ID\")\\n)', 'artwork': 'CREATE TABLE artwork (\\n\"Artwork_ID\" int,\\n\"Type\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Artwork_ID\")\\n)', 'nomination': 'CREATE TABLE nomination (\\n\"Artwork_ID\" int,\\n\"Festival_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Artwork_ID\",\"Festival_ID\"),\\nFOREIGN KEY (\"Artwork_ID\") REFERENCES `artwork`(\"Artwork_ID\"),\\nFOREIGN KEY (\"Festival_ID\") REFERENCES `festival_detail`(\"Festival_ID\")\\n)'}\n\n## User-Prompt:\nفي أي سنة توجد مهرجانات داخل الولايات المتحدة وخارج الولايات المتحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(Num_of_Audience) FROM festival_detail\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nكم عدد الأقسام التي تحتوي عليها الدورة ACCT-211؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = \"Computer Info. Systems\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nهلما تظهر جميع فئات الكتب وعدد الكتب في كل فئة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nاعثر على عدد الطلاب بشكل إجمالي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT card_number FROM member WHERE Hometown LIKE \"%Kentucky%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nمن فضلك أظهر الدول وعدد المتسلقين من كل دولة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Country , COUNT(*) FROM climber GROUP BY Country\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو عدد المدن في الولايات المتحدة التي تحتوي على أكثر من 3 مطارات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nابحث عن رقم تعريفى المرشح الذي يحمل البريد الإلكتروني stanley.monahan@example.org؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nأي الاختبارات لديها نتائج ناجحة؟ قم بإرجاع التواريخ عندما تم إجراء الاختبارات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = \"Pass\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على المبنى، ورقم الغرفة، والفصل الدراسي والسنة لجميع الدورات التي تقدمها قسم علم النفس مرتبة حسب عناوين الدورات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.building , T2.room_number , T2.semester , T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nمن هم الوزراء وما هي الأحزاب التي ينتمون إليها، مرتبة تنازليًا حسب الأوقات التي تولوا فيها المنصب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT minister , party_name FROM party ORDER BY took_office DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nما هي جميع أرقام الهاتف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_phone FROM available_policies\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هو محتوى العنوان للعميل بالاسم 'Maudie Kertzmann'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_details FROM products WHERE product_details LIKE \"%Latte%\" OR product_details LIKE \"%Americano%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nما مجموع عدد الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM student\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هو الحد الأدنى للراتب في كل قسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT MIN(salary) , department_id FROM employees GROUP BY department_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nكم عدد الحسابات التي لديها رصيد توفير أعلى من المتوسط ​​لرصيد التوفير؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هو مبلغ أكبر دفعة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT amount FROM payment ORDER BY amount DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو العمر المتوسط للطلاب الذين يعيشون في المسكن ذو السعة الأكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هو تاريخ التثبيت لكل محطة نهاية على جميع الرحلات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nابحث عن اسم كل مستخدم وعدد التغريدات التي قام بنشرها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nعد عدد الأعضاء في نادي Bootup Baltimore الذين أقل من 18 عامًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age < 18\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Rank_in_series\" int,\\n\"Number_in_season\" int,\\n\"Title\" text,\\n\"Directed_by\" text,\\n\"Original_air_date\" text,\\n\"Production_code\" text,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'cinema': 'CREATE TABLE \"cinema\" (\\n\"Cinema_ID\" int,\\n\"Name\" text,\\n\"Openning_year\" int,\\n\"Capacity\" int,\\n\"Location\" text,\\nPRIMARY KEY (\"Cinema_ID\"))', 'schedule': 'CREATE TABLE \"schedule\" (\\n\"Cinema_ID\" int,\\n\"Film_ID\" int,\\n\"Date\" text,\\n\"Show_times_per_day\" int,\\n\"Price\" float,\\nPRIMARY KEY (\"Cinema_ID\",\"Film_ID\"),\\nFOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),\\nFOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)\\n)'}\n\n## User-Prompt:\nما هو الموقع الذي به أكبر عدد من السينمات التي تم فتحها في عام 2010 أو بعد ذلك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الأحزاب التي لا تمتلك أي أعضاء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nما هو رمز البريد للمقاطعة بالاسم هوارد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT District FROM election\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nما هي أسماء والإيرادات للشركات التي تحقق أعلى إيراد في كل مدينة مقر رئيسي لها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي أسماء الطلاب الذين أخذوا الدورة الأساسية للدورة بعنوان التمويل الدولي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nابحث عن الصف الذي يُدرَّس في الفصل 103.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT grade FROM list WHERE classroom = 103\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n \"People_ID\" int,\\n \"Age\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Graduation_College\" text,\\n PRIMARY KEY (\"People_ID\")\\n)', 'company': 'CREATE TABLE \"company\" (\\n \"Company_ID\" real,\\n \"Name\" text,\\n \"Headquarters\" text,\\n \"Industry\" text,\\n \"Sales_in_Billion\" real,\\n \"Profits_in_Billion\" real,\\n \"Assets_in_Billion\" real,\\n \"Market_Value_in_Billion\" real,\\n PRIMARY KEY (\"Company_ID\")\\n)', 'employment': 'CREATE TABLE \"employment\" (\\n \"Company_ID\" int,\\n \"People_ID\" int,\\n \"Year_working\" int,\\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الشركات وعدد الموظفين الذين يعملون بها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'pilot': 'CREATE TABLE `pilot` (\\n `Pilot_Id` int(11) NOT NULL,\\n `Name` varchar(50) NOT NULL,\\n `Age` int(11) NOT NULL,\\n PRIMARY KEY (`Pilot_Id`)\\n)', 'aircraft': 'CREATE TABLE `aircraft` (\\n \"Aircraft_ID\" int(11) NOT NULL,\\n \"Aircraft\" varchar(50) NOT NULL,\\n \"Description\" varchar(50) NOT NULL,\\n \"Max_Gross_Weight\" varchar(50) NOT NULL,\\n \"Total_disk_area\" varchar(50) NOT NULL,\\n \"Max_disk_Loading\" varchar(50) NOT NULL,\\n PRIMARY KEY (`Aircraft_ID`)\\n)', 'match': 'CREATE TABLE `match` (\\n\"Round\" real,\\n\"Location\" text,\\n\"Country\" text,\\n\"Date\" text,\\n\"Fastest_Qualifying\" text,\\n\"Winning_Pilot\" text,\\n\"Winning_Aircraft\" text,\\nPRIMARY KEY (\"Round\"),\\nFOREIGN KEY (`Winning_Aircraft`) REFERENCES `aircraft`(`Aircraft_ID`),\\nFOREIGN KEY (`Winning_Pilot`) REFERENCES `pilot`(`Pilot_Id`)\\n)', 'airport': 'CREATE TABLE `airport` (\\n\"Airport_ID\" int,\\n\"Airport_Name\" text,\\n\"Total_Passengers\" real,\\n\"%_Change_2007\" text,\\n\"International_Passengers\" real,\\n\"Domestic_Passengers\" real,\\n\"Transit_Passengers\" real,\\n\"Aircraft_Movements\" real,\\n\"Freight_Metric_Tonnes\" real,\\nPRIMARY KEY (\"Airport_ID\")\\n)', 'airport_aircraft': 'CREATE TABLE `airport_aircraft` (\\n\"ID\" int,\\n\"Airport_ID\" int,\\n\"Aircraft_ID\" int,\\nPRIMARY KEY (\"Airport_ID\",\"Aircraft_ID\"),\\nFOREIGN KEY (\"Airport_ID\") REFERENCES `airport`(`Airport_ID`),\\nFOREIGN KEY (\"Aircraft_ID\") REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nسرد أسماء الطائرات التي فازت في المباريات مرتين على الأقل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM pilot ORDER BY Age DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول للطلاب الذين تتراوح أعمارهم بين 20 و 25 عامًا ويعيشون في مدينة PHL؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nاذكر أسماء الأفعوانيات بترتيب تصاعدي حسب الطول.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM roller_coaster\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن فريق كل لاعب وانظرهم في ترتيب أبجدي تصاعدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Team FROM player ORDER BY Team ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو اسم القسم الذي يقدم دورة تحتوي وصفها على كلمة الإحصاء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nعدد العلماء المختلفين الذين تم تعيينهم في أي مشروع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT scientist) FROM assignedto\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأذكر المبلغ واسم المتبرع لأكبر مبلغ تبرع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nما هو نوع السرير واسم كل الغرف ذات الديكور التقليدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT roomName , bedType FROM Rooms WHERE decor = \"traditional\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي المعرفات للدورات في خريف عام 2009 أو في ربيع عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nعد عدد المواقع المختلفة في نادي Bootup Baltimore.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = \"Bootup Baltimore\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هو الرمز البريدي الذي يحتوي على أدنى متوسط لضغط مستوى سطح البحر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nما هو اسم كل حزب وعدد المندوبين المقابل لتلك الحزب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.County_name , COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nقائمة البلدان التي تحتوي على أكثر من سباح واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT nationality) FROM swimmer\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nمن فضلك أظهر الطوائف المختلفة وعدد المدارس المقابل لكل منها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'item': 'CREATE TABLE `item` (\\n `i_id` integer NOT NULL\\n, `title` varchar(20) DEFAULT NULL\\n, PRIMARY KEY (`i_id`)\\n)', 'review': 'CREATE TABLE `review` (\\n `a_id` integer NOT NULL PRIMARY KEY\\n, `u_id` integer NOT NULL\\n, `i_id` integer NOT NULL\\n, `rating` integer DEFAULT NULL\\n, `rank` integer DEFAULT NULL\\n, \\tFOREIGN KEY (`u_id`) REFERENCES `useracct`(`u_id`)\\n, \\tFOREIGN KEY (`i_id`) REFERENCES `item`(`i_id`)\\n)', 'useracct': 'CREATE TABLE `useracct` (\\n `u_id` integer NOT NULL\\n, `name` varchar(128) DEFAULT NULL\\n, PRIMARY KEY (`u_id`)\\n)', 'trust': 'CREATE TABLE \"trust\" (`source_u_id` integer NOT NULL, `target_u_id` integer NOT NULL, `trust` integer NOT NULL, FOREIGN KEY (`source_u_id`) REFERENCES `useracct`(`u_id`), FOREIGN KEY (`target_u_id`) REFERENCES `useracct`(`u_id`))'}\n\n## User-Prompt:\nابحث عن عدد التقييمات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM review\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nأي اللجان التي تضم مندوبين من كل من الحزب الديمقراطي والحزب الليبرالي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Appropriations\" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Economic Matters\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد مكونات الأثاث بالإجمالي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي الصناعات الرئيسية المختلفة لجميع الشركات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT main_industry FROM company\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nمن فضلك، أعرض المتوسط السريع للرواتب للموظفين في كل قسم يحصلون على نسبة عمولة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الأعضاء الذين ليسوا مسؤولين عن أي حدث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي الشركات والمستثمرون لرواد الأعمال؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Company FROM entrepreneur ORDER BY Money_Requested DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nما هو عنوان الورقة التي تحتوي على كلمة قاعدة بيانات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM papers WHERE title LIKE \"%ML%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nأظهر المستثمرين المشتركين بين رواد الأعمال الذين طلبوا أكثر من 140000 ورواد الأعمال الذين طلبوا أقل من 120000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء القنوات التي تمتلكها CCTV أو HBS؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM program WHERE origin != 'Beijing'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nعدد الخدمات المتاحة بالكامل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM services\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي الدرجات الممنوحة في جامعة سان فرانسيسكو الحكومية في عام 2001؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nاعثر على أسماء الأشخاص الذين يكونون أصدقاء لبوب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أقصى وأدنى مبيعات للشركات التي ليست في المصرفية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Profits_billion) FROM Companies\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Party_Theme\" text,\\n\"Location\" text,\\n\"First_year\" text,\\n\"Last_year\" text,\\n\"Number_of_hosts\" int,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'host': 'CREATE TABLE \"host\" (\\n\"Host_ID\" int,\\n\"Name\" text,\\n\"Nationality\" text,\\n\"Age\" text,\\nPRIMARY KEY (\"Host_ID\")\\n)', 'party_host': 'CREATE TABLE \"party_host\" (\\n\"Party_ID\" int,\\n\"Host_ID\" int,\\n\"Is_Main_in_Charge\" bool,\\nPRIMARY KEY (\"Party_ID\",\"Host_ID\"),\\nFOREIGN KEY (\"Host_ID\") REFERENCES `host`(\"Host_ID\"),\\nFOREIGN KEY (\"Party_ID\") REFERENCES `party`(\"Party_ID\")\\n)'}\n\n## User-Prompt:\nلكل حفل، اعثر على موقعه واسم مضيفه. قم بفرز النتيجة بترتيب تصاعدي حسب عمر المضيف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nارجع بأسماء كل طبيب وعدد المرضى الذين يعالجونهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nكم عدد اللاعبين المولودين في الولايات المتحدة الأمريكية والذين هم من الضرب باليد اليمنى؟ أي أن لديهم قيمة R كلاعبين للضرب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name_first , name_last FROM player WHERE death_year = '';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بتواريخ المناظرات مع عدد الجمهور أكبر من 150.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Date FROM debate WHERE Num_of_Audience > 150\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nأي ناشري الفهارس يحتوون على مجموعة فرعية Murray في أسمائهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE \"%Murray%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nعدد الفواتير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Invoices\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء المصارعين الذين تمت الاحتفاظ بهم لأقل من 100 يوم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM wrestler WHERE Days_held < 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nالعثور على عدد الفرق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Band\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء البلدان، المساحة، وعدد السكان التي تحتوي على أفعوانيات بسرعة أعلى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM country WHERE country_id NOT IN ( SELECT country_id FROM roller_coaster WHERE LENGTH > 3000 )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع إدخالات الفهرس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT distinct(catalog_entry_name) FROM catalog_contents\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nما هي الأغاني في الأصوات التي أسفرت عن ترشيح في مهرجانات الموسيقى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الأحزاب وعدد الأعضاء في كل حزب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي هويات الموظفين الذين قاموا بعمل وظيفتين أو أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nكم عدد الحدائق في ولاية نيويورك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هو الوصف والرمز لنوع الخدمة الذي يُنفَّذ بشكل أكثر استمرارًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بأماكن المناظرات بترتيب تصاعدي حسب عدد الجمهور.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Venue FROM debate ORDER BY Num_of_Audience ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nما هو المتوسط ​​لعدد الغرف في الشقق ذات رمز النوع Studio؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nالعثور على الأسماء الأولية والأسماء الأخيرة لأعضاء هيئة التدريس الذكور (الجنس هو M) الذين يعيشون في مبنى NEB.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nكم عدد أنواع الأسرة المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT roomName FROM Rooms WHERE bedType = \"King\" OR bedType = \"Queen\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Rank_in_series\" int,\\n\"Number_in_season\" int,\\n\"Title\" text,\\n\"Directed_by\" text,\\n\"Original_air_date\" text,\\n\"Production_code\" text,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'cinema': 'CREATE TABLE \"cinema\" (\\n\"Cinema_ID\" int,\\n\"Name\" text,\\n\"Openning_year\" int,\\n\"Capacity\" int,\\n\"Location\" text,\\nPRIMARY KEY (\"Cinema_ID\"))', 'schedule': 'CREATE TABLE \"schedule\" (\\n\"Cinema_ID\" int,\\n\"Film_ID\" int,\\n\"Date\" text,\\n\"Show_times_per_day\" int,\\n\"Price\" float,\\nPRIMARY KEY (\"Cinema_ID\",\"Film_ID\"),\\nFOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),\\nFOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)\\n)'}\n\n## User-Prompt:\nأظهر جميع المخرجين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT directed_by FROM film\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nابحث عن تاريخ الزيارة وتفاصيل السائح الذي تفصيله هو 'فنسنت'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = \"Vincent\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب الذين تم قبولهم بعد التجربة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT pPos) FROM tryout\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nالعثور على الاسم والعنوان للعملاء الذين لديهم طلبات جديدة ومعلقة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي المدة القصوى والدقة القصوى لجميع الأغاني، لكل لغة، مرتبة أبجديًا حسب اللغة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nابحث عن الأسماء الأولى لأعضاء هيئة التدريس الذين يشاركون في ركوب الكانو أو التجديف بالقوارب الصغيرة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nما هي تواريخ المعاملات التي تحتوي على عدد أسهم يصل إلى 100 على الأقل أو مبلغ أكبر من 100؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = \"SALE\" GROUP BY T2.investor_id HAVING COUNT(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر الرمز الأكثر شيوعًا لنوع الشقة بين الشقق التي تحتوي على أكثر من حمام واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE \"station\" (\\n\"Station_ID\" int,\\n\"Name\" text,\\n\"Annual_entry_exit\" real,\\n\"Annual_interchanges\" real,\\n\"Total_Passengers\" real,\\n\"Location\" text,\\n\"Main_Services\" text,\\n\"Number_of_Platforms\" int,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Name\" text,\\n\"Time\" text,\\n\"Service\" text,\\nPRIMARY KEY (\"Train_ID\")\\n)', 'train_station': 'CREATE TABLE \"train_station\" (\\n\"Train_ID\" int,\\n\"Station_ID\" int,\\t\\nPRIMARY KEY (\"Train_ID\",\"Station_ID\"),\\nFOREIGN KEY (\"Train_ID\") REFERENCES \"train\"(\"Train_ID\"),\\nFOREIGN KEY (\"Station_ID\") REFERENCES \"station\"(\"Station_ID\")\\n)'}\n\n## User-Prompt:\nأظهر جميع المواقع التي لا تحتوي على محطة قطار بما لا يقل عن 15 منصة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي المنطقة التي تنتج أكبر عدد من أنواع النبيذ قبل عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nأي العملاء ليس لديهم سجل في أول إشعار عن الخسارة؟ أعطني أسماء العملاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nلكل معرّف للسائق الذي شارك في 30 سباقًا على الأكثر، كم عدد السباقات التي شارك فيها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nمن يؤدي في موقع الخلفية للأغنية دير كابتن؟ أظهر الاسم الأول والعائلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Marianne\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع الأنواع بالترتيب الأبجدي، مع دمج تقييماتها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT g_name , rating FROM genre ORDER BY g_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nكم طالبا يدرسهم KAWA GORDON؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"LORIA\" AND T2.lastname = \"ONDERSMA\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء الخدمات التي تم استخدامها أكثر من مرتين في أول إشعار عن الخسارة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING count(*) > 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nابحث عن عدد الطوابق للمبنى ذي أعلى ارتفاع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM buildings ORDER BY Height DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nاختر اسم المنتجات بسعر أقل من أو يساوي 200 دولار.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , price FROM products\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nمتى أصبح العميل الذي يحمل الاسم الأول كارول والاسم الأخير برنهارد عميلا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nكم عدد العلماء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM scientists\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب الذين يتابعون كل مستشار؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT advisor , count(*) FROM Student GROUP BY advisor\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء المنتجات المختلفة؟ ما هو متوسط سعر المنتج لكل منها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = \"film\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هي أنواع الحساسيات المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT allergytype FROM Allergy_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هو اسم العائلة للموسيقيين الذين لعبوا في موقع الخلفية بشكل أكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = \"back\" GROUP BY lastname ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي الحرم الجامعية الموجودة في نورثريدج، لوس أنجلوس أو في سان فرانسيسكو، سان فرانسيسكو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول للطلاب المسجلين في صف الدورة ACCT-211 وحصلوا على درجة C؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nما هو اسم المتجر الذي يحتوي على أكبر كمية من الأجهزة في المخزون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nمتى انضم أحد أفراد الطاقم الذي يحمل الاسم الأول جانيسا والاسم الأخير ساواين إلى الشركة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر أقصى وأدنى عدد للأسهم لأنواع المعاملات المختلفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT transaction_type_code , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء المنتجات التي يكون متوسط سعر المنتج أقل من 1000000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nعدد رموز الميزانية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Ref_budget_codes\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nمن هو أصغر موظف في الشركة؟ قائمة بالاسم الأول والأخير للموظف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nقائمة بإجمالي المبلغ في الفاتورة من شيكاغو، إلينوي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(total) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nأرجوك اعطني النتيجة التي تكرر أكثر في مهرجانات الموسيقى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nأعد أعلى نسبة انتصارات عبر جميع مباريات كرة السلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nابحث عن ناشر الفهارس الذي قام بنشر أكبر عدد من الفهارس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي المناطق الجغرافية والمقاطعات لجميع المناطق الجغرافية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Area , County FROM APPELLATIONS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nكم عدد الطلبيات التي يحملها لوكا مانشيني في فواتيره؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'product': 'CREATE TABLE \"product\" (\\n\"product_id\" int,\\n\"product\" text,\\n\"dimensions\" text,\\n\"dpi\" real,\\n\"pages_per_minute_color\" real,\\n\"max_page_size\" text,\\n\"interface\" text,\\nPRIMARY KEY (\"product_id\")\\n)', 'store': 'CREATE TABLE \"store\" (\\n\"Store_ID\" int,\\n\"Store_Name\" text,\\n\"Type\" text,\\n\"Area_size\" real,\\n\"Number_of_product_category\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Store_ID\")\\n)', 'district': 'CREATE TABLE \"district\" (\\n\"District_ID\" int,\\n\"District_name\" text,\\n\"Headquartered_City\" text,\\n\"City_Population\" real,\\n\"City_Area\" real,\\nPRIMARY KEY (\"District_ID\")\\n)', 'store_product': 'CREATE TABLE \"store_product\" (\\n\"Store_ID\" int,\\n\"Product_ID\" int,\\nPRIMARY KEY (\"Store_ID\",\"Product_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`Product_ID`) REFERENCES `product`(`Product_ID`)\\n)', 'store_district': 'CREATE TABLE \"store_district\" (\\n\"Store_ID\" int,\\n\"District_ID\" int,\\nPRIMARY KEY (\"Store_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`District_ID`) REFERENCES `district`(`District_ID`)\\n)'}\n\n## User-Prompt:\nفي أي مدينة تقع مقر المتجر المسمى بلاكفيل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هو اسم الفني الذي لا ينتمي إلى فريق NYY؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM technician WHERE Team != \"NYY\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nعرض جميع معرفات الحساب وتفاصيل الحساب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Accounts\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nأي مدير فاز بأكبر عدد من جوائز المدير؟ قدم لي الاسم الأول والاسم الأخير والهوية الخاصة بالمدير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nعدد الوثائق التي تحمل مصاريف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Documents_with_expenses\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nأظهر الأسماء لجميع الطائرات التي تقوم بما لا يقل عن رحلتين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي الأسماء والرواتب للمدرسين الذين يكسبون أقل من المتوسط ​​للرواتب للمدرسين في قسم الفيزياء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , salary FROM instructor WHERE salary < (SELECT avg(salary) FROM instructor WHERE dept_name = 'Physics')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'candidate': 'CREATE TABLE \"candidate\" (\\n\"Candidate_ID\" int,\\n\"People_ID\" int,\\n\"Poll_Source\" text,\\n\"Date\" text,\\n\"Support_rate\" real,\\n\"Consider_rate\" real,\\n\"Oppose_rate\" real,\\n\"Unsure_rate\" real,\\nPRIMARY KEY (\"Candidate_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Sex\" text,\\n\"Name\" text,\\n\"Date_of_Birth\" text,\\n\"Height\" real,\\n\"Weight\" real,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هو متوسط الطول والوزن لجميع الذكور (الجنس هو M)؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM people ORDER BY date_of_birth\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nما هي معرفات أعضاء هيئة التدريس الذين لا يشاركون فقط في نشاط ولكنهم أيضًا يقدمون نصيحة لطالب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'phone': 'CREATE TABLE \"phone\" (\\n\"Name\" text,\\n\"Phone_ID\" int,\\n\"Memory_in_G\" int,\\n\"Carrier\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Phone_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"District\" text,\\n\"Num_of_employees\" int,\\n\"Num_of_shops\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'phone_market': 'CREATE TABLE \"phone_market\" (\\n\"Market_ID\" int,\\n\"Phone_ID\" text,\\n\"Num_of_stock\" int,\\nPRIMARY KEY (\"Market_ID\",\"Phone_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES `market`(\"Market_ID\"),\\nFOREIGN KEY (\"Phone_ID\") REFERENCES `phone`(\"Phone_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الناقلات المختلفة للهواتف جنبًا إلى جنب مع عدد الهواتف لكل ناقل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Carrier , COUNT(*) FROM phone GROUP BY Carrier\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب الذين تتجاوز أعمارهم الثامنة عشرة وليس لديهم حساسية إما للطعام أو للحيوانات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nعدد العملاء النشطين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customer WHERE active = '1'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن عدد الطلاب في كل تخصص؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(age) , max(age) , sex FROM student GROUP BY sex\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nما هي معرفات العملاء الذين يحتوون على ديانا في جزء من أسمائهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_id FROM customers WHERE customer_name LIKE \"%Diana%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هي أقصى النقاط التي حصل عليها فريق بوسطن ريد ستوكينغز عندما فاز الفريق في مرحلة ما بعد الموسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nيرجى عرض أسماء المباني التي يكون حالها معلقة، مرتبة تصاعدياً حسب عدد الطوابق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الأولاد لجميع المعلمين الذين يدرسون في الفصل 110.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي الترتيبات، وأسماء الشركات، وقيم السوق لكل شركة في صناعة البنوك مرتبة حسب المبيعات والأرباح؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nابحث عن عدد أنواع الأصوات الغنائية المستخدمة في الأغنية لو بوب\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nابحث عن ساعات المتوسط للطلاب الذين قرارتهم ليست نعم في التجربة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'gymnast': 'CREATE TABLE \"gymnast\" (\\n\"Gymnast_ID\" int,\\n\"Floor_Exercise_Points\" real,\\n\"Pommel_Horse_Points\" real,\\n\"Rings_Points\" real,\\n\"Vault_Points\" real,\\n\"Parallel_Bars_Points\" real,\\n\"Horizontal_Bar_Points\" real,\\n\"Total_Points\" real,\\nPRIMARY KEY (\"Gymnast_ID\"),\\nFOREIGN KEY (\"Gymnast_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\n\"Height\" real,\\n\"Hometown\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء الأشخاص بترتيب أبجدي تصاعدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM People ORDER BY Name ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nأي المدن لديها عميل واحد على الأقل ولكن لا يعيش فيها أي فنان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو السعر المتوسط للرحلات من لوس أنجلوس إلى هونولولو.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(price) FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nاعثر على المدارس التي تم تأسيسها بعد عام 1850 أو هي عامة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nأورد جميع معرّفات العملاء وعدد الحسابات لكل عميل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_id , count(*) FROM Accounts GROUP BY customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الممرضات اللاتي يقدمن الرعاية للمرضى الذين يخضعون لعلاج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT name FROM nurse ORDER BY name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Rank_in_series\" int,\\n\"Number_in_season\" int,\\n\"Title\" text,\\n\"Directed_by\" text,\\n\"Original_air_date\" text,\\n\"Production_code\" text,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'cinema': 'CREATE TABLE \"cinema\" (\\n\"Cinema_ID\" int,\\n\"Name\" text,\\n\"Openning_year\" int,\\n\"Capacity\" int,\\n\"Location\" text,\\nPRIMARY KEY (\"Cinema_ID\"))', 'schedule': 'CREATE TABLE \"schedule\" (\\n\"Cinema_ID\" int,\\n\"Film_ID\" int,\\n\"Date\" text,\\n\"Show_times_per_day\" int,\\n\"Price\" float,\\nPRIMARY KEY (\"Cinema_ID\",\"Film_ID\"),\\nFOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),\\nFOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)\\n)'}\n\n## User-Prompt:\nأظهر العنوان والمخرج لجميع الأفلام.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title , directed_by FROM film\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد البلديات بالمجموع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nما هو اسم الفنان والبلد للفنان الذي قام بأكبر عدد من المعارض؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء المدن مرتبة ترتيباً أبجدياً تصاعدياً؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nمن هم اللاعبين من UCLA؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Player FROM match_season WHERE College = \"UCLA\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nما هي الحالات التي تتناسب مع المدن التي يبلغ سكانها أكثر من 1500 والتي يبلغ سكانها أقل من 500؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر وصف أنواع المعاملات والتواريخ إذا كان عدد الأسهم أقل من 10.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب المسجلين في الكلية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(enr) FROM College\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما المعلومات المتاحة عن الألبومات من عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT * FROM Albums WHERE YEAR = 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هي الأسعار المتوسطة للفنادق مجمعة حسب سياسة الحيوانات الأليفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nكم ناديًا يمتلك ليندا سميث عضوية فيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Linda\" AND t3.lname = \"Smith\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأي نوع من أنواع الحساسيات يحتوي على أقل عدد من الحساسيات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Web_client_accelerator': 'CREATE TABLE \"Web_client_accelerator\" (\\n\"id\" int,\\n\"name\" text,\\n\"Operating_system\" text,\\n\"Client\" text,\\n\"Connection\" text,\\nprimary key(\"id\")\\n)', 'browser': 'CREATE TABLE \"browser\" (\\n\"id\" int,\\n\"name\" text,\\n\"market_share\" real,\\nprimary key(\"id\")\\n)', 'accelerator_compatible_browser': 'CREATE TABLE \"accelerator_compatible_browser\" (\\n\"accelerator_id\" int,\\n\"browser_id\" int,\\n\"compatible_since_year\" int,\\nprimary key(\"accelerator_id\", \"browser_id\"),\\nforeign key (\"accelerator_id\") references `Web_client_accelerator`(\"id\"),\\nforeign key (\"browser_id\") references `browser`(\"id\")\\n)'}\n\n## User-Prompt:\nكم عدد أنواع العملاء المختلفة التي يدعمها تسريع عملاء الويب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT client) FROM web_client_accelerator\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو اسم وسعة المسكن الذي يحتوي على أقل عدد من الخدمات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Is_Male\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'church': 'CREATE TABLE \"church\" (\\n\"Church_ID\" int,\\n\"Name\" text,\\n\"Organized_by\" text,\\n\"Open_Date\" int,\\n\"Continuation_of\" text,\\nPRIMARY KEY (\"Church_ID\")\\n)', 'wedding': 'CREATE TABLE \"wedding\" (\\n\"Church_ID\" int,\\n\"Male_ID\" int,\\n\"Female_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Church_ID\",\"Male_ID\",\"Female_ID\"),\\nFOREIGN KEY (\"Church_ID\") REFERENCES `church`(\"Church_ID\"),\\nFOREIGN KEY (\"Male_ID\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Female_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nاعرض الاسم وسنة الافتتاح لثلاث كنائس فُتحت مؤخرًا بشكل أكثر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , open_date FROM church ORDER BY open_date DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nعرض الحزب الذي يضم أكبر عدد من الأشخاص.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nكم كان إجمالي عدد المباريات التي حضرها فريق Boston Red Stockings من عام 2000 إلى 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nعدد الطلاب الذكور الذين كان لديهم تصويت لعضو في مجلس الطلاب في دورة الانتخابات الخريفية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = \"M\" AND T2.Election_Cycle = \"Fall\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أرقام الهواتف لكل موظف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Phone FROM EMPLOYEE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على أسماء جميع المدرسين الذين يتقاضون رواتب أعلى من رواتب جميع المدرسين في قسم البيولوجيا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM instructor WHERE salary > (SELECT max(salary) FROM instructor WHERE dept_name = 'Biology')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن عدد أنواع الانتماء المختلفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT affiliation) FROM university\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nمتى غادر أحد أفراد الطاقم الذي يحمل الاسم الأول جانيسا والاسم الأخير ساواين الشركة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nأرني مالك القناة ذات التقييم الأعلى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nما هو إجمالي عدد الوصول للمستندات التي هي من نوع المستند الأكثر شيوعًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Premises': 'CREATE TABLE `Premises` (\\n`premise_id` INTEGER PRIMARY KEY,\\n`premises_type` VARCHAR(15) NOT NULL,\\n`premise_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_category` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_login` VARCHAR(80),\\n`customer_password` VARCHAR(10)\\n)', 'Mailshot_Campaigns': 'CREATE TABLE `Mailshot_Campaigns` (\\n`mailshot_id` INTEGER PRIMARY KEY,\\n`product_category` VARCHAR(15),\\n`mailshot_name` VARCHAR(80),\\n`mailshot_start_date` DATETIME,\\n`mailshot_end_date` DATETIME\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`premise_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`premise_id` ) REFERENCES `Premises`(`premise_id` )\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(15) NOT NULL,\\n`shipping_method_code` VARCHAR(15) NOT NULL,\\n`order_placed_datetime` DATETIME NOT NULL,\\n`order_delivered_datetime` DATETIME,\\n`order_shipping_charges` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Mailshot_Customers': 'CREATE TABLE `Mailshot_Customers` (\\n`mailshot_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(15) NOT NULL,\\n`mailshot_customer_date` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`mailshot_id` ) REFERENCES `Mailshot_Campaigns`(`mailshot_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`item_id` INTEGER NOT NULL ,\\n`order_item_status_code` VARCHAR(15) NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`item_status_code` VARCHAR(15),\\n`item_delivered_datetime` DATETIME,\\n`item_order_quantity` VARCHAR(80),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nعرض كل نوع من المنشآت وعدد المنشآت في هذا النوع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT premises_type , premise_details FROM premises ORDER BY premises_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nأورد النوادي التي لديها Davis Steven كعضو.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Eric\" AND t3.lname = \"Tai\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'aircraft': 'CREATE TABLE \"aircraft\" (\\n\"Aircraft_ID\" int,\\n\"Order_Year\" int,\\n\"Manufacturer\" text,\\n\"Model\" text,\\n\"Fleet_Series\" text,\\n\"Powertrain\" text,\\n\"Fuel_Propulsion\" text,\\nPRIMARY KEY (\"Aircraft_ID\")\\n)', 'pilot': 'CREATE TABLE \"pilot\" (\\n\"Pilot_ID\" int,\\n\"Pilot_name\" text,\\n\"Rank\" int,\\n\"Age\" int,\\n\"Nationality\" text,\\n\"Position\" text,\\n\"Join_Year\" int,\\n\"Team\" text,\\nPRIMARY KEY (\"Pilot_ID\")\\n)', 'pilot_record': 'CREATE TABLE \"pilot_record\" (\\n\"Record_ID\" int,\\n\"Pilot_ID\" int,\\n\"Aircraft_ID\" int,\\n\"Date\" text,\\nPRIMARY KEY (\"Pilot_ID\", \"Aircraft_ID\", \"Date\"),\\nFOREIGN KEY (`Pilot_ID`) REFERENCES `pilot`(`Pilot_ID`),\\nFOREIGN KEY (`Aircraft_ID`) REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد الطيارين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM pilot\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"City\" text,\\n\"Hanzi\" text,\\n\"Hanyu_Pinyin\" text,\\n\"Regional_Population\" int,\\n\"GDP\" real,\\nPRIMARY KEY (\"City_ID\")\\n)', 'match': 'CREATE TABLE \"match\" (\\n\"Match_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Score\" text,\\n\"Result\" text,\\n\"Competition\" text,\\nPRIMARY KEY (\"Match_ID\")\\n)', 'temperature': 'CREATE TABLE \"temperature\" (\\n\"City_ID\" int,\\n\"Jan\" real,\\n\"Feb\" real,\\n\"Mar\" real,\\n\"Apr\" real,\\n\"Jun\" real,\\n\"Jul\" real,\\n\"Aug\" real,\\n\"Sep\" real,\\n\"Oct\" real,\\n\"Nov\" real,\\n\"Dec\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)\\n)', 'hosting_city': 'CREATE TABLE \"hosting_city\" (\\n \"Year\" int,\\n \"Match_ID\" int,\\n \"Host_City\" text,\\n PRIMARY KEY (\"Year\"),\\n FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),\\n FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)\\n)'}\n\n## User-Prompt:\nأي مدينة استضافت أكبر عدد من الفعاليات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nإلى أي فئة ينتمي المنتج المسمى الكتان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_category_code , typical_buying_price FROM products WHERE product_name = \"cumin\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هي هويات البيان المختلفة على الحسابات وعدد الحسابات لكل منها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nسرد جميع سنوات الافتتاح عندما يتم فتح متجرين على الأقل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT city FROM branch WHERE membership_amount >= 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nمن كان المستشارين للطلاب الذين لديهم تصويت لأمين الصندوق في دورة الانتخابات الربيعية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = \"Spring\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو إجمالي المبلغ المالي الذي دفعه العميل كارول بيرنهارد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد الدورات بشكل إجمالي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nاختر جميع البيانات من المنتجات ومصنع كل منتج.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هي أدوار الموظفين الذين...\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام الشقق وتاريخ البداية وتاريخ النهاية لكل حجز للشقة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي قائمة أسماء الأندية بترتيب أبجدي تنازلي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM club ORDER BY Start_year ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'publication': 'CREATE TABLE \"publication\" (\\n\"Publication_ID\" int,\\n\"Book_ID\" int,\\n\"Publisher\" text,\\n\"Publication_Date\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Publication_ID\"),\\nFOREIGN KEY (\"Book_ID\") REFERENCES \"book\"(\"Book_ID\")\\n)', 'book': 'CREATE TABLE \"book\" (\\n\"Book_ID\" int,\\n\"Title\" text,\\n\"Issues\" real,\\n\"Writer\" text,\\nPRIMARY KEY (\"Book_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد التواريخ المختلفة للنشر في سجلنا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT (DISTINCT Publication_Date) FROM publication\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هي الأدوار التي يوجد فيها ثلاثة أو أكثر من الموظفين؟ أعطني رموز الأدوار.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Address\" text,\\n\"Num_of_staff\" text,\\n\"Score\" real,\\n\"Open_Year\" text,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Membership_card\" text,\\n\"Age\" int,\\n\"Time_of_purchase\" int,\\n\"Level_of_membership\" int,\\n\"Address\" text,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'happy_hour': 'CREATE TABLE \"happy_hour\" (\\n\"HH_ID\" int,\\n\"Shop_ID\" int,\\n\"Month\" text,\\n\"Num_of_shaff_in_charge\" int,\\nPRIMARY KEY (\"HH_ID\",\"Shop_ID\",\"Month\"),\\nFOREIGN KEY (\"Shop_ID\") REFERENCES `shop`(\"Shop_ID\")\\n)', 'happy_hour_member': 'CREATE TABLE \"happy_hour_member\" (\\n\"HH_ID\" int,\\n\"Member_ID\" int,\\n\"Total_amount\" real,\\nPRIMARY KEY (\"HH_ID\",\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nاعثر على عنوان وعدد الموظفين في المتاجر التي لا تملك أي ساعة سعيدة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT address , num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي المقطوعات التي اشتراها Dean Peeters؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = \"Daan\" AND T4.last_name = \"Peeters\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n \"People_ID\" int,\\n \"Age\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Graduation_College\" text,\\n PRIMARY KEY (\"People_ID\")\\n)', 'company': 'CREATE TABLE \"company\" (\\n \"Company_ID\" real,\\n \"Name\" text,\\n \"Headquarters\" text,\\n \"Industry\" text,\\n \"Sales_in_Billion\" real,\\n \"Profits_in_Billion\" real,\\n \"Assets_in_Billion\" real,\\n \"Market_Value_in_Billion\" real,\\n PRIMARY KEY (\"Company_ID\")\\n)', 'employment': 'CREATE TABLE \"employment\" (\\n \"Company_ID\" int,\\n \"People_ID\" int,\\n \"Year_working\" int,\\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي المقرات الرئيسية والصناعات لجميع الشركات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM company ORDER BY Sales_in_Billion ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء السفن التي تحتوي على أكثر من قبطان واحد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو اسم ومدينة وبلد المطار الذي يمتلك أعلى ارتفاع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nأورد النوادي التي يوجد لديها عضو على الأقل مع مستشار 1121.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Davis\" AND t3.lname = \"Steven\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Address_Types': 'CREATE TABLE `Ref_Address_Types` (\\n`address_type_code` VARCHAR(15) PRIMARY KEY,\\n`address_type_description` VARCHAR(80)\\n)', 'Ref_Detention_Type': 'CREATE TABLE `Ref_Detention_Type` (\\n`detention_type_code` VARCHAR(10) PRIMARY KEY,\\n`detention_type_description` VARCHAR(80)\\n)', 'Ref_Incident_Type': 'CREATE TABLE `Ref_Incident_Type` (\\n`incident_type_code` VARCHAR(10) PRIMARY KEY,\\n`incident_type_description` VARCHAR(80)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1` VARCHAR(120),\\n`line_2` VARCHAR(120),\\n`line_3` VARCHAR(120),\\n`city` VARCHAR(80),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(40),\\n`last_name` VARCHAR(40),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`date_first_rental` DATETIME,\\n`date_left_university` DATETIME,\\n`other_student_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Teachers': 'CREATE TABLE `Teachers` (\\n`teacher_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender` VARCHAR(1),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Assessment_Notes': 'CREATE TABLE `Assessment_Notes` (\\n`notes_id` INTEGER NOT NULL ,\\n`student_id` INTEGER,\\n`teacher_id` INTEGER NOT NULL,\\n`date_of_notes` DATETIME,\\n`text_of_notes` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Behavior_Incident': 'CREATE TABLE `Behavior_Incident` (\\n`incident_id` INTEGER PRIMARY KEY,\\n`incident_type_code` VARCHAR(10) NOT NULL,\\n`student_id` INTEGER NOT NULL,\\n`date_incident_start` DATETIME,\\n`date_incident_end` DATETIME,\\n`incident_summary` VARCHAR(255),\\n`recommendations` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Detention': 'CREATE TABLE `Detention` (\\n`detention_id` INTEGER PRIMARY KEY,\\n`detention_type_code` VARCHAR(10) NOT NULL,\\n`teacher_id` INTEGER,\\n`datetime_detention_start` DATETIME,\\n`datetime_detention_end` DATETIME,\\n`detention_summary` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Student_Addresses': 'CREATE TABLE `Student_Addresses` (\\n`student_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`date_address_to` DATETIME,\\n`monthly_rental` DECIMAL(19,4),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Students_in_Detention': 'CREATE TABLE `Students_in_Detention` (\\n`student_id` INTEGER NOT NULL,\\n`detention_id` INTEGER NOT NULL,\\n`incident_id` INTEGER NOT NULL,\\nFOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),\\nFOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)'}\n\n## User-Prompt:\nما هي معرّف ورمز الرمز البريدي للعنوان الذي يمتلك أعلى إيجار شهري؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.datetime_detention_start , datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schultz\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي معرّفات المدرسين الذين لم يدروسوا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT id FROM instructor EXCEPT SELECT id FROM teaches\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هو الاسم الكامل (الاسم الأول والاسم الأخير) لتلك الموظفين الذين يحصلون على راتب أعلى من الموظف الذي يحمل رقم 163؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nقم بتسجيل عدد ومعرف كل منتج في جميع الطلبات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nكم عدد الأقسام في كل مدرسة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هو نوع لعبة الفيديو Call of Destiny؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT gname FROM Video_games WHERE gtype = \"Collectible card game\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nما هو رقم الهاتف والبريد الإلكتروني للعميل الذي يحمل الاسم الأول Aniyah والاسم الأخير Feest؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nاذكر أسماء الأقسام التي ينتمي إليها بشكل أساسي بعض الأطباء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT physician , department FROM affiliated_with WHERE primaryaffiliation = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو معرف الحساب الذي يحتوي على أكبر عدد من المعاملات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nما هي أرقام اختيار الانضمام وفصول الانضمام للاعبين الذين يلعبون في مركز الدفاع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = \"Defender\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول والاسم الأخير لمشرف ليندا سميث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هي أسماء وأعمار ووظائف جميع الأشخاص الذين هم أصدقاء مع أليس لأطول فترة زمنية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.age , T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE friend = 'Alice')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nكم عدد الطرق التي تنتهي في مطار كندي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء والوصف للصور التي تم التقاطها في معلم الجذب السياحي مهرجان الأفلام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = \"game1\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nكم نوعًا مختلفًا من الأدوار لديها فريق المشروع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT role_code) FROM Project_Staff\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي التسميات للنبيذ الذي تم إنتاجه بعد عام 2008 ولكن ليس في منطقة الساحل الوسطى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nمن فضلك، أعرض معرّف البلد وعدد المدن لكل بلد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT department_id , AVG(salary) FROM employees WHERE commission_pct != \"null\" GROUP BY department_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nقائمة بأسماء جميع الدورات وأسماء مدرسيهم مرتبة ترتيباً أبجدياً في عام 2008.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.title , T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هو عدد الطلاب الذين يعيشون في مدينة تحمل الرمز NYC والذين لديهم تصويت لعضو في مجلس الطلاب في دورة الانتخابات الربيعية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = \"M\" AND T2.Election_Cycle = \"Fall\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'musical': 'CREATE TABLE \"musical\" (\\n\"Musical_ID\" int,\\n\"Name\" text,\\n\"Year\" int,\\n\"Award\" text,\\n\"Category\" text,\\n\"Nominee\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"Musical_ID\")\\n)', 'actor': 'CREATE TABLE \"actor\" (\\n\"Actor_ID\" int,\\n\"Name\" text,\\n\"Musical_ID\" int,\\n\"Character\" text,\\n\"Duration\" text,\\n\"age\" int,\\nPRIMARY KEY (\"Actor_ID\"),\\nFOREIGN KEY (\"Musical_ID\") REFERENCES \"actor\"(\"Actor_ID\")\\n)'}\n\n## User-Prompt:\nقائمة أشهر نتيجة للمسرحيات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع أساتذة المحاسبة الذين يدرسون وما هي الصفوف الدراسية للدورات التي يدرسونها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأي نوع من أنواع الحساسيات هو الأكثر شيوعًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nاختر الاسم والسعر لجميع المنتجات بسعر أكبر من أو يساوي 180 دولارًا، وفرزها أولاً حسب السعر (تنازلياً)، ثم حسب الاسم (تصاعدياً).\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM products WHERE price >= 180\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nكم عدد الألعاب التي تم لعبها في جميع مباريات كرة القدم بواسطة الطلاب الحاصلين على منح دراسية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(gamesplayed) FROM Sportsinfo\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي أسماء وأعداد التسجيل في الكليات التي يتجاوز عدد الطلاب المسجلين فيها 10000 وتقع في ولاية لويزيانا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT cName , enr FROM College WHERE enr > 10000 AND state = \"LA\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nعدد الأوراق الكلي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM papers\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الأشخاص، وتواريخ وأماكن المناظرات التي يكونون في الجانب السلبي، مرتبة بترتيب أبجدي تصاعدي للاسم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول والعمر لكل طالب يعيش في مسكن يحتوي على صالة تلفزيون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nأعطني وصف تصنيف النجوم للفنادق التي تكلف أكثر من 10000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو رمز الحالة ورقم الهاتف وعنوان البريد الإلكتروني للعميل الذي يحمل الاسم الأخير كولر أو الاسم الأول مارينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هو اسم أثقل رائد أعمال؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن المؤلف الذي حقق أعلى درجة في تقديمه.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Author FROM submission ORDER BY Scores DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nابحث عن المدينة التي لديها الرمز البريدي 255.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"City\" text,\\n\"Hanzi\" text,\\n\"Hanyu_Pinyin\" text,\\n\"Regional_Population\" int,\\n\"GDP\" real,\\nPRIMARY KEY (\"City_ID\")\\n)', 'match': 'CREATE TABLE \"match\" (\\n\"Match_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Score\" text,\\n\"Result\" text,\\n\"Competition\" text,\\nPRIMARY KEY (\"Match_ID\")\\n)', 'temperature': 'CREATE TABLE \"temperature\" (\\n\"City_ID\" int,\\n\"Jan\" real,\\n\"Feb\" real,\\n\"Mar\" real,\\n\"Apr\" real,\\n\"Jun\" real,\\n\"Jul\" real,\\n\"Aug\" real,\\n\"Sep\" real,\\n\"Oct\" real,\\n\"Nov\" real,\\n\"Dec\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)\\n)', 'hosting_city': 'CREATE TABLE \"hosting_city\" (\\n \"Year\" int,\\n \"Match_ID\" int,\\n \"Host_City\" text,\\n PRIMARY KEY (\"Year\"),\\n FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),\\n FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)\\n)'}\n\n## User-Prompt:\nأي مدينة لديها أعلى درجة حرارة في شهر فبراير؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT city , GDP FROM city ORDER BY GDP LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي أنواع الأصوات الغنائية التي قام زميل الفرقة الذي يحمل الاسم الأول سولفايج بتشغيلها بشكل أكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Solveig\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nكم عدد السكك الحديدية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(capacity) FROM stadium WHERE opening_year = 2005\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Is_Male\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'church': 'CREATE TABLE \"church\" (\\n\"Church_ID\" int,\\n\"Name\" text,\\n\"Organized_by\" text,\\n\"Open_Date\" int,\\n\"Continuation_of\" text,\\nPRIMARY KEY (\"Church_ID\")\\n)', 'wedding': 'CREATE TABLE \"wedding\" (\\n\"Church_ID\" int,\\n\"Male_ID\" int,\\n\"Female_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Church_ID\",\"Male_ID\",\"Female_ID\"),\\nFOREIGN KEY (\"Church_ID\") REFERENCES `church`(\"Church_ID\"),\\nFOREIGN KEY (\"Male_ID\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Female_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nاعرض جميع السنوات الافتتاحية وعدد الكنائس التي فُتحت في كل سنة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT open_date , count(*) FROM church GROUP BY open_date\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nعطني الأغاني المدرجة في الأصوات التي كانت في القمة لأكثر من أسبوع واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Song FROM volume WHERE Weeks_on_Top > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nأعد الاسم الكامل ورقم الهاتف للعميل الذي يمتلك بطاقة رقم 4560596484842.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'stadium': 'CREATE TABLE \"stadium\" (\\n\"id\" int,\\n\"name\" text,\\n\"Home_Games\" int,\\n\"Average_Attendance\" real,\\n\"Total_Attendance\" real,\\n\"Capacity_Percentage\" real,\\nprimary key (\"id\")\\n)', 'game': 'CREATE TABLE \"game\" (\\n\"stadium_id\" int,\\n\"id\" int,\\n\"Season\" int,\\n\"Date\" text,\\n\"Home_team\" text,\\n\"Away_team\" text,\\n\"Score\" text,\\n\"Competition\" text,\\nprimary key (\"id\"),\\nforeign key (\"stadium_id\") references `stadium`(\"id\")\\n)', 'injury_accident': 'CREATE TABLE \"injury_accident\" (\\n\"game_id\" int,\\n\"id\" int,\\n\"Player\" text,\\n\"Injury\" text,\\n\"Number_of_matches\" text,\\n\"Source\" text,\\nprimary key (\"id\"),\\nforeign key (\"game_id\") references `game`(\"id\")\\n)'}\n\n## User-Prompt:\nأظهر الاسم، والحضور المتوسط، والحضور الإجمالي للملاعب التي لم تحدث فيها حوادث.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , average_attendance , total_attendance FROM stadium EXCEPT SELECT T2.name , T2.average_attendance , T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nابحث عن وصف فئة المنتج لفئة المنتج ذات الرمز التوابل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nمن فضلك عليك إظهار نائب الحاكم والمحاسب من الحزب الديمقراطي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT Governor) FROM party\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي أسماء جميع الحرم الجامعية الموجودة في تشيكو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campus FROM campuses WHERE county = \"Los Angeles\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n \"Member_ID\" text,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Role\" text,\\n PRIMARY KEY (\"Member_ID\")\\n)', 'performance': 'CREATE TABLE \"performance\" (\\n \"Performance_ID\" real,\\n \"Date\" text,\\n \"Host\" text,\\n \"Location\" text,\\n \"Attendance\" int,\\n PRIMARY KEY (\"Performance_ID\")\\n)', 'member_attendance': 'CREATE TABLE \"member_attendance\" (\\n \"Member_ID\" int,\\n \"Performance_ID\" int,\\n \"Num_of_Pieces\" int,\\n PRIMARY KEY (\"Member_ID\",\"Performance_ID\"),\\n FOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\"),\\n FOREIGN KEY (\"Performance_ID\") REFERENCES `performance`(\"Performance_ID\")\\n)'}\n\n## User-Prompt:\nعرض المواقع المختلفة وعدد الأداءات في كل موقع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION , COUNT(*) FROM performance GROUP BY LOCATION\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nكم عدد ميلي ثانية يدوم مقطوعة Fast As a Shark؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT milliseconds FROM tracks WHERE name = \"Fast As a Shark\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nاذكر جميع المعلومات حول مؤلفي الدورات والمعلمين بترتيب أبجدي للأسماء الشخصية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT subject_name FROM SUBJECTS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Address_Types': 'CREATE TABLE `Ref_Address_Types` (\\n`address_type_code` VARCHAR(15) PRIMARY KEY,\\n`address_type_description` VARCHAR(80)\\n)', 'Ref_Detention_Type': 'CREATE TABLE `Ref_Detention_Type` (\\n`detention_type_code` VARCHAR(10) PRIMARY KEY,\\n`detention_type_description` VARCHAR(80)\\n)', 'Ref_Incident_Type': 'CREATE TABLE `Ref_Incident_Type` (\\n`incident_type_code` VARCHAR(10) PRIMARY KEY,\\n`incident_type_description` VARCHAR(80)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1` VARCHAR(120),\\n`line_2` VARCHAR(120),\\n`line_3` VARCHAR(120),\\n`city` VARCHAR(80),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(40),\\n`last_name` VARCHAR(40),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`date_first_rental` DATETIME,\\n`date_left_university` DATETIME,\\n`other_student_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Teachers': 'CREATE TABLE `Teachers` (\\n`teacher_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender` VARCHAR(1),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Assessment_Notes': 'CREATE TABLE `Assessment_Notes` (\\n`notes_id` INTEGER NOT NULL ,\\n`student_id` INTEGER,\\n`teacher_id` INTEGER NOT NULL,\\n`date_of_notes` DATETIME,\\n`text_of_notes` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Behavior_Incident': 'CREATE TABLE `Behavior_Incident` (\\n`incident_id` INTEGER PRIMARY KEY,\\n`incident_type_code` VARCHAR(10) NOT NULL,\\n`student_id` INTEGER NOT NULL,\\n`date_incident_start` DATETIME,\\n`date_incident_end` DATETIME,\\n`incident_summary` VARCHAR(255),\\n`recommendations` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Detention': 'CREATE TABLE `Detention` (\\n`detention_id` INTEGER PRIMARY KEY,\\n`detention_type_code` VARCHAR(10) NOT NULL,\\n`teacher_id` INTEGER,\\n`datetime_detention_start` DATETIME,\\n`datetime_detention_end` DATETIME,\\n`detention_summary` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Student_Addresses': 'CREATE TABLE `Student_Addresses` (\\n`student_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`date_address_to` DATETIME,\\n`monthly_rental` DECIMAL(19,4),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Students_in_Detention': 'CREATE TABLE `Students_in_Detention` (\\n`student_id` INTEGER NOT NULL,\\n`detention_id` INTEGER NOT NULL,\\n`incident_id` INTEGER NOT NULL,\\nFOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),\\nFOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)'}\n\n## User-Prompt:\nما هو رقم الهاتف الخلوي للطالب الذي يمتلك عنوانه أقل إيجار شهري؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.address_id , T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين لم يطلبوا أبدًا المنتج لاتيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nفي أي بلد يعيش العميل Carole Bernhard؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'perpetrator': 'CREATE TABLE \"perpetrator\" (\\n\"Perpetrator_ID\" int,\\n\"People_ID\" int,\\n\"Date\" text,\\n\"Year\" real,\\n\"Location\" text,\\n\"Country\" text,\\n\"Killed\" int,\\n\"Injured\" int,\\nPRIMARY KEY (\"Perpetrator_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Home Town\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء الجناة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\ncustomer_id INTEGER NOT NULL,\\ncustomer_details VARCHAR(255),\\nPRIMARY KEY (customer_id)\\n)', 'Properties': 'CREATE TABLE Properties (\\nproperty_id INTEGER NOT NULL,\\nproperty_type_code CHAR(15) NOT NULL,\\nproperty_address VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (property_id)\\n)', 'Residents': 'CREATE TABLE Residents (\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\ndate_moved_out DATETIME NOT NULL,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, property_id, date_moved_in),\\nFOREIGN KEY (property_id) REFERENCES Properties (property_id)\\n)', 'Organizations': 'CREATE TABLE Organizations (\\norganization_id INTEGER NOT NULL,\\nparent_organization_id INTEGER,\\norganization_details VARCHAR(255),\\nPRIMARY KEY (organization_id)\\n)', 'Services': 'CREATE TABLE Services (\\nservice_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (service_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Residents_Services': 'CREATE TABLE Residents_Services (\\nresident_id INTEGER NOT NULL,\\nservice_id INTEGER NOT NULL,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\ndate_requested DATETIME,\\ndate_provided DATETIME,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, service_id),\\nFOREIGN KEY (service_id) REFERENCES Services (service_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Things': 'CREATE TABLE Things (\\nthing_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nType_of_Thing_Code CHAR(15) NOT NULL,\\nservice_type_code CHAR(10) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (thing_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Customer_Events': 'CREATE TABLE Customer_Events (\\nCustomer_Event_ID INTEGER NOT NULL,\\ncustomer_id INTEGER,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\nresident_id INTEGER,\\nthing_id INTEGER NOT NULL,\\nPRIMARY KEY (Customer_Event_ID),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id),\\nFOREIGN KEY (customer_id) REFERENCES Customers (customer_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Customer_Event_Notes': 'CREATE TABLE Customer_Event_Notes (\\nCustomer_Event_Note_ID INTEGER NOT NULL,\\nCustomer_Event_ID INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\nPRIMARY KEY (Customer_Event_Note_ID),\\nFOREIGN KEY (Customer_Event_ID) REFERENCES Customer_Events (Customer_Event_ID)\\n)', 'Timed_Status_of_Things': 'CREATE TABLE Timed_Status_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Date DATETIME NOT NULL,\\nStatus_of_Thing_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Date, Status_of_Thing_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id)\\n)', 'Timed_Locations_of_Things': 'CREATE TABLE Timed_Locations_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Time DATETIME NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Time, Location_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id))'}\n\n## User-Prompt:\nمتى كان آخر يوم انتقال لأي ساكن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nكم نادي ينتمي الطالب المسمى Eric Tai إليه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"HOU\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nهلما تظهر الناشرين الذين نشروا كتابًا في عام 1989 وكتابًا في عام 1990؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nكم ناديًا ينتمي ليندا سميث إليه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Pen and Paper Gaming\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nكم عدد بطاقات العميل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Customers_cards\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nما هو مجموع ومتوسط جميع مبالغ التسوية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nما هي أسماء وتواريخ ميلاد أفضل خمسة لاعبين من حيث الإمكانيات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.player_name , T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mission': 'CREATE TABLE \"mission\" (\\n\"Mission_ID\" int,\\n\"Ship_ID\" int,\\n\"Code\" text,\\n\"Launched_Year\" int,\\n\"Location\" text,\\n\"Speed_knots\" int,\\n\"Fate\" text,\\nPRIMARY KEY (\"Mission_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES `ship`(\"Ship_ID\")\\n)', 'ship': 'CREATE TABLE \"ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Nationality\" text,\\n\"Tonnage\" int,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nما هي أنواع وجنسيات كل سفينة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE , Nationality FROM ship\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nاحسب عدد المصارعين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM wrestler\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nكم عدد الرحلات التي لم تنتهي في سان فرانسيسكو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأي رمز لنوع الشقة هو الأكثر شيوعًا بين الشقق التي تحتوي على أكثر من حمام واحد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nعد عدد المنتجات التي لم يتم طلبها أبدًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الاسم الأول والاسم الأخير لتلك الموظفين الذين يعملون إما في القسم 70 أو القسم 90؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة لجميع الموظفين وكم عدد الأشخاص الذين يُبلغون إليهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هي الاسم، والهوية، وعدد الزيارات المقابلة لكل معلم جذب سياحي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو رقم التعريف والتفاصيل للمركبة المستخدمة في الدروس معظم الأوقات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع أصدقاء أصدقاء أليس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name != 'Alice'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هو تقييم النجوم المتوسط لكل فيلم لم يتم مراجعته من قبل بريتاني هاريس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT mID , avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\") GROUP BY mID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\ndocument_type_code CHAR(15) NOT NULL,\\ndocument_type_description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (document_type_code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nrole_code CHAR(15) NOT NULL,\\nrole_description VARCHAR(255),\\nPRIMARY KEY (role_code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\naddress_details VARCHAR(255),\\nPRIMARY KEY (address_id)\\n)', 'Ref_Document_Status': 'CREATE TABLE Ref_Document_Status (\\ndocument_status_code CHAR(15) NOT NULL,\\ndocument_status_description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (document_status_code)\\n)', 'Ref_Shipping_Agents': 'CREATE TABLE Ref_Shipping_Agents (\\nshipping_agent_code CHAR(15) NOT NULL,\\nshipping_agent_name VARCHAR(255) NOT NULL,\\nshipping_agent_description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (shipping_agent_code)\\n)', 'Documents': 'CREATE TABLE Documents (\\ndocument_id INTEGER NOT NULL,\\ndocument_status_code CHAR(15) NOT NULL,\\ndocument_type_code CHAR(15) NOT NULL,\\nshipping_agent_code CHAR(15),\\nreceipt_date DATETIME,\\nreceipt_number VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (document_id),\\nFOREIGN KEY (document_type_code) REFERENCES Ref_Document_Types (document_type_code),\\nFOREIGN KEY (document_status_code) REFERENCES Ref_Document_Status (document_status_code),\\nFOREIGN KEY (shipping_agent_code) REFERENCES Ref_Shipping_Agents (shipping_agent_code)\\n)', 'Employees': 'CREATE TABLE Employees (\\nemployee_id INTEGER NOT NULL,\\nrole_code CHAR(15) NOT NULL,\\nemployee_name VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (employee_id),\\nFOREIGN KEY (role_code) REFERENCES Roles (role_code)\\n)', 'Document_Drafts': 'CREATE TABLE Document_Drafts (\\ndocument_id INTEGER NOT NULL,\\ndraft_number INTEGER NOT NULL,\\ndraft_details VARCHAR(255),\\nPRIMARY KEY (document_id, draft_number),\\nFOREIGN KEY (document_id) REFERENCES Documents (document_id)\\n)', 'Draft_Copies': 'CREATE TABLE Draft_Copies (\\ndocument_id INTEGER NOT NULL,\\ndraft_number INTEGER NOT NULL,\\ncopy_number INTEGER NOT NULL,\\nPRIMARY KEY (document_id, draft_number, copy_number),\\nFOREIGN KEY (document_id, draft_number) REFERENCES Document_Drafts (document_id,draft_number)\\n)', 'Circulation_History': 'CREATE TABLE Circulation_History (\\ndocument_id INTEGER NOT NULL,\\ndraft_number INTEGER NOT NULL,\\ncopy_number INTEGER NOT NULL,\\nemployee_id INTEGER NOT NULL,\\nPRIMARY KEY (document_id, draft_number, copy_number, employee_id),\\nFOREIGN KEY (document_id, draft_number, copy_number) REFERENCES Draft_Copies (document_id,draft_number,copy_number),\\nFOREIGN KEY (employee_id) REFERENCES Employees (employee_id)\\n)', 'Documents_Mailed': 'CREATE TABLE Documents_Mailed (\\ndocument_id INTEGER NOT NULL,\\nmailed_to_address_id INTEGER NOT NULL,\\nmailing_date DATETIME,\\nPRIMARY KEY (document_id, mailed_to_address_id),\\nFOREIGN KEY (document_id) REFERENCES Documents (document_id),\\nFOREIGN KEY (mailed_to_address_id) REFERENCES Addresses (address_id)\\n)'}\n\n## User-Prompt:\nما هي تفاصيل المسودة للمستند ذو الهوية 7؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT draft_details FROM Document_Drafts WHERE document_id = 7;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسعار الوحدة المتميزة لجميع المسارات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT distinct(UnitPrice) FROM TRACK\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nالعثور على عدد أنواع المنتجات المختلفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nكم عدد الألبومات التي يمتلكها Billy Cobham؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Billy Cobham\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'manufacturer': 'CREATE TABLE \"manufacturer\" (\\n \"Manufacturer_ID\" int,\\n \"Open_Year\" real,\\n \"Name\" text,\\n \"Num_of_Factories\" int,\\n \"Num_of_Shops\" int,\\n PRIMARY KEY (\"Manufacturer_ID\")\\n)', 'furniture': 'CREATE TABLE \"furniture\" (\\n \"Furniture_ID\" int,\\n \"Name\" text,\\n \"Num_of_Component\" int,\\n \"Market_Rate\" real,\\n PRIMARY KEY (\"Furniture_ID\")\\n)', 'furniture_manufacte': 'CREATE TABLE \"furniture_manufacte\" (\\n \"Manufacturer_ID\" int,\\n \"Furniture_ID\" int,\\n \"Price_in_Dollar\" real,\\n PRIMARY KEY (\"Manufacturer_ID\",\"Furniture_ID\"),\\n FOREIGN KEY (\"Manufacturer_ID\") REFERENCES `manufacturer`(\"Manufacturer_ID\"),\\n FOREIGN KEY (\"Furniture_ID\") REFERENCES `furniture`(\"Furniture_ID\")\\n)'}\n\n## User-Prompt:\nما هي حصص السوق وأسماء الأثاث الذي لا تنتجه أي شركة في سجلاتنا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.name , t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nأي المعالم السياحية تم زيارتها مرتين على الأقل؟ أعطني أسمائها وهوياتها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nما هي معلومات المندوب واللجنة لكل سجل انتخابي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Delegate , Committee FROM election\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nما هي تفاصيل الشراء للمعاملات بمبلغ أكبر من 10000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = \"l\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'train': 'CREATE TABLE \"train\" (\\n \"id\" int,\\n \"train_number\" int,\\n \"name\" text,\\n \"origin\" text,\\n \"destination\" text,\\n \"time\" text,\\n \"interval\" text,\\n primary key (\"id\")\\n)', 'station': 'CREATE TABLE \"station\" (\\n \"id\" int,\\n \"network_name\" text,\\n \"services\" text,\\n \"local_authority\" text,\\n primary key (\"id\")\\n)', 'route': 'CREATE TABLE \"route\" (\\n \"train_id\" int,\\n \"station_id\" int,\\n primary key (\"train_id\", \"station_id\"),\\n foreign key (\"train_id\") references `train`(\"id\"),\\n foreign key (\"station_id\") references `station`(\"id\")\\n)', 'weekly_weather': 'CREATE TABLE \"weekly_weather\" (\\n \"station_id\" int,\\n \"day_of_week\" text,\\n \"high_temperature\" int,\\n \"low_temperature\" int,\\n \"precipitation\" real,\\n \"wind_speed_mph\" int,\\n primary key (\"station_id\", \"day_of_week\"),\\n foreign key (\"station_id\") references \"station\"(\"id\")\\n)'}\n\n## User-Prompt:\nما هو عدد أساتذة قسم المحاسبة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT origin FROM train GROUP BY origin HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Third_Party_Companies': 'CREATE TABLE `Third_Party_Companies` (\\n`company_id` INTEGER PRIMARY KEY ,\\n`company_type` VARCHAR(5) NOT NULL,\\n`company_name` VARCHAR(255),\\n`company_address` VARCHAR(255),\\n`other_company_details` VARCHAR(255)\\n)', 'Maintenance_Contracts': 'CREATE TABLE `Maintenance_Contracts` (\\n`maintenance_contract_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_company_id` INTEGER NOT NULL,\\n`contract_start_date` DATETIME,\\n`contract_end_date` DATETIME,\\n`other_contract_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Parts': 'CREATE TABLE `Parts` (\\n`part_id` INTEGER PRIMARY KEY,\\n`part_name` VARCHAR(255),\\n`chargeable_yn` VARCHAR(1),\\n`chargeable_amount` VARCHAR(20),\\n`other_part_details` VARCHAR(255)\\n)', 'Skills': 'CREATE TABLE `Skills` (\\n`skill_id` INTEGER PRIMARY KEY,\\n`skill_code` VARCHAR(20),\\n`skill_description` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_name` VARCHAR(255),\\n`gender` VARCHAR(1),\\n`other_staff_details` VARCHAR(255)\\n)', 'Assets': 'CREATE TABLE `Assets` (\\n`asset_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_id` INTEGER NOT NULL,\\n`supplier_company_id` INTEGER NOT NULL,\\n`asset_details` VARCHAR(255),\\n`asset_make` VARCHAR(20),\\n`asset_model` VARCHAR(20),\\n`asset_acquired_date` DATETIME,\\n`asset_disposed_date` DATETIME,\\n`other_asset_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_id` )\\nREFERENCES `Maintenance_Contracts`(`maintenance_contract_id` ),\\nFOREIGN KEY (`supplier_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Asset_Parts': 'CREATE TABLE `Asset_Parts` (\\n`asset_id` INTEGER NOT NULL,\\n`part_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` ),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` )\\n)', 'Maintenance_Engineers': 'CREATE TABLE `Maintenance_Engineers` (\\n`engineer_id` INTEGER PRIMARY KEY,\\n`company_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(50),\\n`last_name` VARCHAR(50),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Engineer_Skills': 'CREATE TABLE `Engineer_Skills` (\\n`engineer_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)', 'Fault_Log': 'CREATE TABLE `Fault_Log` (\\n`fault_log_entry_id` INTEGER PRIMARY KEY,\\n`asset_id` INTEGER NOT NULL,\\n`recorded_by_staff_id` INTEGER NOT NULL,\\n`fault_log_entry_datetime` DATETIME,\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` ),\\nFOREIGN KEY (`recorded_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Engineer_Visits': 'CREATE TABLE `Engineer_Visits` (\\n`engineer_visit_id` INTEGER PRIMARY KEY,\\n`contact_staff_id` INTEGER,\\n`engineer_id` INTEGER NOT NULL,\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\n`visit_start_datetime` DATETIME,\\n`visit_end_datetime` DATETIME,\\n`other_visit_details` VARCHAR(255),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` ),\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`contact_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Part_Faults': 'CREATE TABLE `Part_Faults` (\\n`part_fault_id` INTEGER PRIMARY KEY,\\n`part_id` INTEGER NOT NULL,\\n`fault_short_name` VARCHAR(20),\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` )\\n)', 'Fault_Log_Parts': 'CREATE TABLE `Fault_Log_Parts` (\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`part_fault_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` )\\n)', 'Skills_Required_To_Fix': 'CREATE TABLE `Skills_Required_To_Fix` (\\n`part_fault_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)'}\n\n## User-Prompt:\nما هي جميع وصفات العيوب وحالة العيب لجميع العيوب المسجلة في السجلات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.part_name , count(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو إجمالي عدد شركات الطيران؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , city , country , elevation FROM airports WHERE city = 'New York'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Address\" text,\\n\"Num_of_staff\" text,\\n\"Score\" real,\\n\"Open_Year\" text,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Membership_card\" text,\\n\"Age\" int,\\n\"Time_of_purchase\" int,\\n\"Level_of_membership\" int,\\n\"Address\" text,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'happy_hour': 'CREATE TABLE \"happy_hour\" (\\n\"HH_ID\" int,\\n\"Shop_ID\" int,\\n\"Month\" text,\\n\"Num_of_shaff_in_charge\" int,\\nPRIMARY KEY (\"HH_ID\",\"Shop_ID\",\"Month\"),\\nFOREIGN KEY (\"Shop_ID\") REFERENCES `shop`(\"Shop_ID\")\\n)', 'happy_hour_member': 'CREATE TABLE \"happy_hour_member\" (\\n\"HH_ID\" int,\\n\"Member_ID\" int,\\n\"Total_amount\" real,\\nPRIMARY KEY (\"HH_ID\",\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nما هي معرفات وعناوين المتاجر التي تحتوي على ساعة سعيدة في شهر مايو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.address , t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nأظهر اسم البلد وعدد سكانه الذي يحتوي على أعلى أفعوانية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'event': 'CREATE TABLE \"event\" (\\n \"Event_ID\" int,\\n \"Date\" text,\\n \"Venue\" text,\\n \"Name\" text,\\n \"Event_Attendance\" int,\\n PRIMARY KEY (\"Event_ID\")\\n)', 'journalist': 'CREATE TABLE \"journalist\" (\\n \"journalist_ID\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Age\" text,\\n \"Years_working\" int,\\n PRIMARY KEY (\"journalist_ID\")\\n)', 'news_report': 'CREATE TABLE \"news_report\" (\\n \"journalist_ID\" int,\\n \"Event_ID\" int,\\n \"Work_Type\" text,\\n PRIMARY KEY (\"journalist_ID\",\"Event_ID\"),\\n FOREIGN KEY (\"journalist_ID\") REFERENCES `journalist`(\"journalist_ID\"),\\n FOREIGN KEY (\"Event_ID\") REFERENCES `event`(\"Event_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الصحفيين من إنجلترا أو ويلز.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Nationality , Age FROM journalist\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nابحث عن العدد الإجمالي للدورات المقدمة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM COURSES\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nكم عدد الحسابات التي يمتلكها العميل الذي له الاسم الأول Art والاسم الأخير Turcotte؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي أسماء العائلة لجميع الطلاب الذين حصلوا على الدرجة C في صف دراسي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء ومعرفات المنتجات التي تتراوح أسعارها بين 600 و 700؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي جميع الأغاني التي قام بها الفنان الذي يحمل الاسم الأخير هيلو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Songs\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هو متوسط الرسوم لحرم جامعة كاليفورنيا الحكومية في عام ٢٠٠٥؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الرسمية للمدن التي لم تستضف أي مسابقة زراعية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هو نوع ومعرّف المنظمة التي تمتلك أكبر عدد من موظفي البحث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nكم عدد المتابعين لكل مستخدم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM follows\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى لجميع الطلاب الذين يعيشون في المسكن الذي يحتوي على أكبر عدد من الخدمات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Discount_Coupons': 'CREATE TABLE `Discount_Coupons` (\\n`coupon_id` INTEGER PRIMARY KEY,\\n`date_issued` DATETIME,\\n`coupon_amount` DECIMAL(19,4)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`coupon_id` INTEGER NOT NULL,\\n`good_or_bad_customer` VARCHAR(4),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`date_became_customer` DATETIME,\\n`date_last_hire` DATETIME,\\nFOREIGN KEY (`coupon_id` ) REFERENCES `Discount_Coupons`(`coupon_id` )\\n)', 'Bookings': 'CREATE TABLE `Bookings` (\\n`booking_id` INTEGER PRIMARY KEY ,\\n`customer_id` INTEGER NOT NULL,\\n`booking_status_code` VARCHAR(10) NOT NULL,\\n`returned_damaged_yn` VARCHAR(40),\\n`booking_start_date` DATETIME,\\n`booking_end_date` DATETIME,\\n`count_hired` VARCHAR(40),\\n`amount_payable` DECIMAL(19,4),\\n`amount_of_discount` DECIMAL(19,4),\\n`amount_outstanding` DECIMAL(19,4),\\n`amount_of_refund` DECIMAL(19,4),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products_for_Hire': 'CREATE TABLE `Products_for_Hire` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(15) NOT NULL,\\n`daily_hire_cost` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255)\\n)', 'Payments': 'CREATE TABLE `Payments` (\\n`payment_id` INTEGER PRIMARY KEY,\\n`booking_id` INTEGER,\\n`customer_id` INTEGER NOT NULL,\\n`payment_type_code` VARCHAR(15) NOT NULL,\\n`amount_paid_in_full_yn` VARCHAR(1),\\n`payment_date` DATETIME,\\n`amount_due` DECIMAL(19,4),\\n`amount_paid` DECIMAL(19,4),\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products_Booked': 'CREATE TABLE `Products_Booked` (\\n`booking_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`returned_yn` VARCHAR(1),\\n`returned_late_yn` VARCHAR(1),\\n`booked_count` INTEGER,\\n`booked_amount` FLOAT NULL,\\nPRIMARY KEY (`booking_id`, `product_id`)\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )\\n)', 'View_Product_Availability': 'CREATE TABLE `View_Product_Availability` (\\n`product_id` INTEGER NOT NULL,\\n`booking_id` INTEGER NOT NULL,\\n`status_date` DATETIME PRIMARY KEY,\\n`available_yn` VARCHAR(1),\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو مبلغ الكوبون للكوبونات التي تمتلكها كل من الزبائن الجيدين والسيئين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nاعثر على رصيد الادخار للحساب الذي يحمل أعلى رصيد جري.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هو إجمالي عدد الألعاب التي تم لعبها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(gamesplayed) FROM Sportsinfo\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هو الرمز البريدي الذي يحتوي على أدنى متوسط لضغط مستوى سطح البحر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Restaurant': 'CREATE TABLE Restaurant (\\n ResID INTEGER PRIMARY KEY,\\n ResName VARCHAR(100),\\n Address VARCHAR(100),\\n Rating INTEGER\\n)', 'Type_Of_Restaurant': 'CREATE TABLE Type_Of_Restaurant (\\n ResID INTEGER,\\n ResTypeID INTEGER,\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID),\\n FOREIGN KEY(ResTypeID) REFERENCES Restaurant_Type(ResTypeID)\\n)', 'Restaurant_Type': 'CREATE TABLE Restaurant_Type (\\n ResTypeID INTEGER PRIMARY KEY,\\n ResTypeName VARCHAR(40),\\n ResTypeDescription VARCHAR(100)\\n)', 'Visits_Restaurant': 'CREATE TABLE Visits_Restaurant (\\n StuID INTEGER,\\n ResID INTEGER,\\n Time TIMESTAMP,\\n Spent FLOAT,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID)\\n)'}\n\n## User-Prompt:\nفي أي مطعم قضى الطلاب أقل مدة زمنية؟ أذكر المطعم والوقت الذي قضاه الطلاب فيه بشكل إجمالي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\" AND Restaurant.ResName = \"Subway\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nما هي رموز أنواع الشقق وأرقام الشقق في المباني التي يديرها كايل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = \"Kyle\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنيين الذين ليسوا في الفريق NYY؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM technician WHERE Team != \"NYY\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما اسم أصغر رجل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي معرّفات جميع المراجعين الذين لم يقدّموا تقييم بـ 4 نجوم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'journal': 'CREATE TABLE \"journal\" (\\n\"Journal_ID\" int,\\n\"Date\" text,\\n\"Theme\" text,\\n\"Sales\" int,\\nPRIMARY KEY (\"Journal_ID\")\\n)', 'editor': 'CREATE TABLE \"editor\" (\\n\"Editor_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\nPRIMARY KEY (\"Editor_ID\")\\n)', 'journal_committee': 'CREATE TABLE \"journal_committee\" (\\n\"Editor_ID\" int,\\n\"Journal_ID\" int,\\n\"Work_Type\" text,\\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\\n)'}\n\n## User-Prompt:\nما هو متوسط المبيعات للمجلات التي لديها محرر يعمل من نوع 'الصورة'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nعدد الدول؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM county_public_safety\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأعط وحدة القياس للمنتج الذي يحمل اسم 'الكمون'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"cumin\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nكم من المال أنفق لوكاس مانشيني؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nكم عدد الوحدات الدراسية الكلية التي تقدمها كل قسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(credits) , dept_name FROM course GROUP BY dept_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nما هي الأسماء للمناطق غير المتأثرة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT region_id) FROM affected_region\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن رتبة القبطان التي تحتوي على بعض القباطنة في فئتي القاطر والقاطر المسلح.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nفي أي مدينة يعيش جانيسا ساواين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو رقم الفاتورة وتاريخ الفاتورة المتوافق مع الفاتورة التي تحتوي على أكبر عدد من المعاملات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nابحث عن اسم العميل الذي قام بأكبر عدد من الطلبات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي أسماء المراجعين الذين قد قيموا بـ 3 نجوم و 4 نجوم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM Movie WHERE director = \"James Cameron\" OR YEAR < 1980\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nأعرض جميع المحطات المتميزة التي بدأت منها رحلة بمدة أقل من 100.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT start_station_name FROM trip WHERE duration < 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب الذين يعانون من حساسية تجاه القطط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هو المتوسط ​​الزمني للأغاني التي تحمل تنسيق mp3 وبدقة أقل من 800؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND T2.languages = \"bangla\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء المصارعين ومواقعهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name , LOCATION FROM wrestler\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هي معرّفات جميع الموظفين الذين وافقوا على تدمير الوثائق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هي جميع أكواد أنواع المستندات وأسماء أنواع المستندات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_type_code , document_type_name FROM Ref_document_types\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nأبلغ عن جميع المستشارين الذين يستشير أكثر من طالبين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الأسماء الكاملة والرواتب لأي موظفين يكسبون أقل من 6000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name , last_name , salary FROM employees WHERE salary < 6000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هي هويات البيانات، تفاصيل البيانات، وتفاصيل الحساب لجميع الحسابات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء وتاريخ الطلبات التي حالتها 'تم التسليم'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customer_orders WHERE order_details = \"Second time\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nكم عدد المندوبين المميزين الذين ينتمون إلى المقاطعات التي يتجاوز تعداد سكانها الـ 50000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولية للطلاب، مرتبة حسب العمر من الأكبر إلى الأصغر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Fname FROM STUDENT ORDER BY Age DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هو متوسط الرصيد الحسابي للعملاء الذين لديهم درجة ائتمان أقل من 50 لأنواع الحسابات المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(acc_bal) , acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'perpetrator': 'CREATE TABLE \"perpetrator\" (\\n\"Perpetrator_ID\" int,\\n\"People_ID\" int,\\n\"Date\" text,\\n\"Year\" real,\\n\"Location\" text,\\n\"Country\" text,\\n\"Killed\" int,\\n\"Injured\" int,\\nPRIMARY KEY (\"Perpetrator_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Home Town\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي بلدان الجناة؟ أظهر كل بلد وعدد الجناة المقابل فيها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Country , COUNT(*) FROM perpetrator GROUP BY Country\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nأظهر مواقع المدارس التي تحتوي على أكثر من لاعب واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nما هي القوة الشرطية المشتركة بين المقاطعات التي تقع مواقعها إلى الشرق والغرب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة للطلاب الذين يبلغون 18 عامًا ولديهم تصويت لنائب الرئيس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'manufacturer': 'CREATE TABLE \"manufacturer\" (\\n \"Manufacturer_ID\" int,\\n \"Open_Year\" real,\\n \"Name\" text,\\n \"Num_of_Factories\" int,\\n \"Num_of_Shops\" int,\\n PRIMARY KEY (\"Manufacturer_ID\")\\n)', 'furniture': 'CREATE TABLE \"furniture\" (\\n \"Furniture_ID\" int,\\n \"Name\" text,\\n \"Num_of_Component\" int,\\n \"Market_Rate\" real,\\n PRIMARY KEY (\"Furniture_ID\")\\n)', 'furniture_manufacte': 'CREATE TABLE \"furniture_manufacte\" (\\n \"Manufacturer_ID\" int,\\n \"Furniture_ID\" int,\\n \"Price_in_Dollar\" real,\\n PRIMARY KEY (\"Manufacturer_ID\",\"Furniture_ID\"),\\n FOREIGN KEY (\"Manufacturer_ID\") REFERENCES `manufacturer`(\"Manufacturer_ID\"),\\n FOREIGN KEY (\"Furniture_ID\") REFERENCES `furniture`(\"Furniture_ID\")\\n)'}\n\n## User-Prompt:\nأعطني اسم وسنة افتتاح الشركات المصنعة التي لديها إما أقل من 10 مصانع أو أكثر من 10 متاجر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , manufacturer_id FROM manufacturer ORDER BY open_year\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي الولايات التي تحتوي على كليات حضر فيها طلاب يخوضون التجربة لموقع الهجوم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الأشخاص الذين يكونون في الجانب الموافق للمناظرات مع عدد الجمهور أكبر من 200.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'publication': 'CREATE TABLE \"publication\" (\\n\"Publication_ID\" int,\\n\"Book_ID\" int,\\n\"Publisher\" text,\\n\"Publication_Date\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Publication_ID\"),\\nFOREIGN KEY (\"Book_ID\") REFERENCES \"book\"(\"Book_ID\")\\n)', 'book': 'CREATE TABLE \"book\" (\\n\"Book_ID\" int,\\n\"Title\" text,\\n\"Issues\" real,\\n\"Writer\" text,\\nPRIMARY KEY (\"Book_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بالكتَّاب الذين كتبوا أكثر من كتاب واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nأي مبنى يحتوي على أكبر عدد من أعضاء هيئة التدريس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT building , count(*) FROM Faculty GROUP BY building\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هي أسماء السكن الجامعي للإناث فقط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dorm_name FROM dorm WHERE gender = 'F'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nاسترجاع جميع الأسماء الأولى والألقاب للكتّاب مرتبة ترتيباً أبجدياً حسب الألقاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT lname FROM authors ORDER BY lname\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Representative_ID\" int,\\n\"Date\" text,\\n\"Votes\" real,\\n\"Vote_Percent\" real,\\n\"Seats\" real,\\n\"Place\" real,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\\n)', 'representative': 'CREATE TABLE \"representative\" (\\n\"Representative_ID\" int,\\n\"Name\" text,\\n\"State\" text,\\n\"Party\" text,\\n\"Lifespan\" text,\\nPRIMARY KEY (\"Representative_ID\")\\n)'}\n\n## User-Prompt:\nما هي فترات حياة النواب من ولاية نيويورك أو ولاية إنديانا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Lifespan FROM representative WHERE State = \"New York\" OR State = \"Indiana\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nما هم المؤلفون الذين قدموا تقديماتهم من كلية Florida أو Temple؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Author FROM submission WHERE College = \"Florida\" OR College = \"Temple\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي العناوين والمعرفات للألبومات التي تحتوي على مسارات بسعر وحدة أكبر من 1؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء الموظفين الذين تم تعيينهم في وظائف متعددة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع السباقات التي أُقيمت بعد عام 2000 في إسبانيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هو رسم الحرم الجامعي لجامعة سان خوسيه في عام ١٩٩٦؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1996\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هي معرّفات الموظفين الذين يحملون اسم الدور Human Resource أو Manager؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Human Resource\" OR T2.role_name = \"Manager\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nفي أي بلد يعيش العميل الذي يحمل الاسم الأول Carole والاسم الأخير Bernhard؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nأعد أسماء الدول التي تحتوي على لاعبين يلعبون في موقع المهاجم، بالإضافة إلى اللاعبين الذين يلعبون في موقع المدافع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nما هو متوسط وأدنى عمر جميع الفنانين من الولايات المتحدة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(age) , min(age) FROM artist WHERE country = 'United States'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nأي دور هو الأكثر شيوعًا بالنسبة للموظفين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي أسماء الطلاب الذين حضروا دورة في الخريف من عام 2003؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nاعثر على الرصيد الجاري المتوسط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(balance) FROM checking\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nأظهر الفريق الذي يمتلك ما لا يقل عن اثنين من الفنيين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Web_client_accelerator': 'CREATE TABLE \"Web_client_accelerator\" (\\n\"id\" int,\\n\"name\" text,\\n\"Operating_system\" text,\\n\"Client\" text,\\n\"Connection\" text,\\nprimary key(\"id\")\\n)', 'browser': 'CREATE TABLE \"browser\" (\\n\"id\" int,\\n\"name\" text,\\n\"market_share\" real,\\nprimary key(\"id\")\\n)', 'accelerator_compatible_browser': 'CREATE TABLE \"accelerator_compatible_browser\" (\\n\"accelerator_id\" int,\\n\"browser_id\" int,\\n\"compatible_since_year\" int,\\nprimary key(\"accelerator_id\", \"browser_id\"),\\nforeign key (\"accelerator_id\") references `Web_client_accelerator`(\"id\"),\\nforeign key (\"browser_id\") references `browser`(\"id\")\\n)'}\n\n## User-Prompt:\nقم بتسجيل اسماء المتصفحات بترتيب تنازلي حسب حصة السوق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM browser ORDER BY market_share DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هو المتوسط ​​لعدد النجوم التي يمنحها كل مراجع لفيلم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nاستعرض جميع هويات البيانات وتفاصيلها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Statements\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nما هي هوية الطالب واسم تسجيل الدخول للطالب الذين مسجلين في أكبر عدد من الدورات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nأورد تفاصيل الحساب الأخرى للحساب بالاسم 338؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT other_account_details FROM Accounts WHERE account_name = \"338\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nكم عدد أعضاء هيئة التدريس لدينا لكل رتبة وجنس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nكم عدد الخدمات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Party_Theme\" text,\\n\"Location\" text,\\n\"First_year\" text,\\n\"Last_year\" text,\\n\"Number_of_hosts\" int,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'host': 'CREATE TABLE \"host\" (\\n\"Host_ID\" int,\\n\"Name\" text,\\n\"Nationality\" text,\\n\"Age\" text,\\nPRIMARY KEY (\"Host_ID\")\\n)', 'party_host': 'CREATE TABLE \"party_host\" (\\n\"Party_ID\" int,\\n\"Host_ID\" int,\\n\"Is_Main_in_Charge\" bool,\\nPRIMARY KEY (\"Party_ID\",\"Host_ID\"),\\nFOREIGN KEY (\"Host_ID\") REFERENCES `host`(\"Host_ID\"),\\nFOREIGN KEY (\"Party_ID\") REFERENCES `party`(\"Party_ID\")\\n)'}\n\n## User-Prompt:\nأظهر مواقع الحفلات التي تضم مضيفين يبلغون من العمر أكثر من 50 عامًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nفي أي مبنى يعيش المحاضر الذي يدرس أكبر عدد من الدورات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(20),\\n`product_price` DECIMAL(19,4),\\n`product_description` VARCHAR(255)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(10) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80),\\n`date_became_customer` DATETIME\\n)', 'Regular_Orders': 'CREATE TABLE `Regular_Orders` (\\n`regular_order_id` INTEGER PRIMARY KEY,\\n`distributer_id` INTEGER NOT NULL,\\nFOREIGN KEY (`distributer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Regular_Order_Products': 'CREATE TABLE `Regular_Order_Products` (\\n`regular_order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`regular_order_id` ) REFERENCES `Regular_Orders`(`regular_order_id` )\\n)', 'Actual_Orders': 'CREATE TABLE `Actual_Orders` (\\n`actual_order_id` INTEGER PRIMARY KEY,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`regular_order_id` INTEGER NOT NULL,\\n`actual_order_date` DATETIME,\\nFOREIGN KEY (`regular_order_id` ) REFERENCES `Regular_Orders`(`regular_order_id` )\\n)', 'Actual_Order_Products': 'CREATE TABLE `Actual_Order_Products` (\\n`actual_order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`actual_order_id` ) REFERENCES `Actual_Orders`(`actual_order_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(10) NOT NULL,\\n`date_to` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Delivery_Routes': 'CREATE TABLE `Delivery_Routes` (\\n`route_id` INTEGER PRIMARY KEY,\\n`route_name` VARCHAR(50),\\n`other_route_details` VARCHAR(255)\\n)', 'Delivery_Route_Locations': 'CREATE TABLE `Delivery_Route_Locations` (\\n`location_code` VARCHAR(10) PRIMARY KEY,\\n`route_id` INTEGER NOT NULL,\\n`location_address_id` INTEGER NOT NULL,\\n`location_name` VARCHAR(50),\\nFOREIGN KEY (`location_address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`route_id` ) REFERENCES `Delivery_Routes`(`route_id` )\\n)', 'Trucks': 'CREATE TABLE `Trucks` (\\n`truck_id` INTEGER PRIMARY KEY,\\n`truck_licence_number` VARCHAR(20),\\n`truck_details` VARCHAR(255)\\n)', 'Employees': 'CREATE TABLE `Employees` (\\n`employee_id` INTEGER PRIMARY KEY,\\n`employee_address_id` INTEGER NOT NULL,\\n`employee_name` VARCHAR(80),\\n`employee_phone` VARCHAR(80),\\nFOREIGN KEY (`employee_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Order_Deliveries': 'CREATE TABLE `Order_Deliveries` (\\n`location_code` VARCHAR(10) NOT NULL,\\n`actual_order_id` INTEGER NOT NULL,\\n`delivery_status_code` VARCHAR(10) NOT NULL,\\n`driver_employee_id` INTEGER NOT NULL,\\n`truck_id` INTEGER NOT NULL,\\n`delivery_date` DATETIME,\\nFOREIGN KEY (`truck_id` ) REFERENCES `Trucks`(`truck_id` ),\\nFOREIGN KEY (`actual_order_id` ) REFERENCES `Actual_Orders`(`actual_order_id` ),\\nFOREIGN KEY (`location_code` ) REFERENCES `Delivery_Route_Locations`(`location_code` ),\\nFOREIGN KEY (`driver_employee_id` ) REFERENCES `Employees`(`employee_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين لا يعيشون في ولاية كاليفورنيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_name FROM products ORDER BY product_price DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nأي متجر يمتلك أكبر عدد من العملاء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو عنوان نانسي إدواردز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT address FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nأعطني المتوسط والحد الأدنى للسعر (باليورو) للمنتجات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الممرضات اللاتي يكونن في خدمة الاستدعاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM appointment\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(20),\\n`product_price` DECIMAL(19,4),\\n`product_description` VARCHAR(255)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(10) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80),\\n`date_became_customer` DATETIME\\n)', 'Regular_Orders': 'CREATE TABLE `Regular_Orders` (\\n`regular_order_id` INTEGER PRIMARY KEY,\\n`distributer_id` INTEGER NOT NULL,\\nFOREIGN KEY (`distributer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Regular_Order_Products': 'CREATE TABLE `Regular_Order_Products` (\\n`regular_order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`regular_order_id` ) REFERENCES `Regular_Orders`(`regular_order_id` )\\n)', 'Actual_Orders': 'CREATE TABLE `Actual_Orders` (\\n`actual_order_id` INTEGER PRIMARY KEY,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`regular_order_id` INTEGER NOT NULL,\\n`actual_order_date` DATETIME,\\nFOREIGN KEY (`regular_order_id` ) REFERENCES `Regular_Orders`(`regular_order_id` )\\n)', 'Actual_Order_Products': 'CREATE TABLE `Actual_Order_Products` (\\n`actual_order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`actual_order_id` ) REFERENCES `Actual_Orders`(`actual_order_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(10) NOT NULL,\\n`date_to` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Delivery_Routes': 'CREATE TABLE `Delivery_Routes` (\\n`route_id` INTEGER PRIMARY KEY,\\n`route_name` VARCHAR(50),\\n`other_route_details` VARCHAR(255)\\n)', 'Delivery_Route_Locations': 'CREATE TABLE `Delivery_Route_Locations` (\\n`location_code` VARCHAR(10) PRIMARY KEY,\\n`route_id` INTEGER NOT NULL,\\n`location_address_id` INTEGER NOT NULL,\\n`location_name` VARCHAR(50),\\nFOREIGN KEY (`location_address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`route_id` ) REFERENCES `Delivery_Routes`(`route_id` )\\n)', 'Trucks': 'CREATE TABLE `Trucks` (\\n`truck_id` INTEGER PRIMARY KEY,\\n`truck_licence_number` VARCHAR(20),\\n`truck_details` VARCHAR(255)\\n)', 'Employees': 'CREATE TABLE `Employees` (\\n`employee_id` INTEGER PRIMARY KEY,\\n`employee_address_id` INTEGER NOT NULL,\\n`employee_name` VARCHAR(80),\\n`employee_phone` VARCHAR(80),\\nFOREIGN KEY (`employee_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Order_Deliveries': 'CREATE TABLE `Order_Deliveries` (\\n`location_code` VARCHAR(10) NOT NULL,\\n`actual_order_id` INTEGER NOT NULL,\\n`delivery_status_code` VARCHAR(10) NOT NULL,\\n`driver_employee_id` INTEGER NOT NULL,\\n`truck_id` INTEGER NOT NULL,\\n`delivery_date` DATETIME,\\nFOREIGN KEY (`truck_id` ) REFERENCES `Trucks`(`truck_id` ),\\nFOREIGN KEY (`actual_order_id` ) REFERENCES `Actual_Orders`(`actual_order_id` ),\\nFOREIGN KEY (`location_code` ) REFERENCES `Delivery_Route_Locations`(`location_code` ),\\nFOREIGN KEY (`driver_employee_id` ) REFERENCES `Employees`(`employee_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أسماء وأرقام هواتف العملاء الذين يعيشون في ولاية كاليفورنيا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_email , customer_name FROM customers WHERE payment_method = 'Visa'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nما هي هويات أعضاء هيئة التدريس الذكور؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT FacID FROM Faculty WHERE Sex = 'M'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء ومعرفات المستندات التي تحمل رمز نوع المستند BK؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nما هو اسم الإدخال للفهرس ذي أعلى سعر (بالدولار الأمريكي)؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو العدد الإجمالي للطلاب الذين يعيشون في مسكن الذكور (بجنس M)؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nأي الأوراق تحتوي على الجزء الفرعي قاعدة بيانات في عناوينها؟ عرض عناوين الأوراق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM papers WHERE title LIKE \"%Database%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي أرقام النبيذ لأنواع العنب المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى المميزة للطلاب الذين لديهم تصويت لرئيس الفصل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nمن فضلك، أعرض عنوان الوظيفة والفارق بين الحد الأدنى والحد الأقصى للرواتب لتلك الوظائف التي تكون الحد الأقصى للراتب في نطاق 12000 إلى 18000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT job_title FROM jobs WHERE min_salary > 9000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي الولايات التي بها أكبر عدد من الفواتير؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nما هو متوسط السعر الأساسي للغرف، لكل نوع من أنواع الأسرة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء الأغاني التي يكون تقييمها أقل من تقييم جميع الأغاني باللغة الإنجليزية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء مقاطعات السلامة العامة، مرتبة حسب السكان بترتيب تنازلي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM county_public_safety ORDER BY Population DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Rank_in_series\" int,\\n\"Number_in_season\" int,\\n\"Title\" text,\\n\"Directed_by\" text,\\n\"Original_air_date\" text,\\n\"Production_code\" text,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'cinema': 'CREATE TABLE \"cinema\" (\\n\"Cinema_ID\" int,\\n\"Name\" text,\\n\"Openning_year\" int,\\n\"Capacity\" int,\\n\"Location\" text,\\nPRIMARY KEY (\"Cinema_ID\"))', 'schedule': 'CREATE TABLE \"schedule\" (\\n\"Cinema_ID\" int,\\n\"Film_ID\" int,\\n\"Date\" text,\\n\"Show_times_per_day\" int,\\n\"Price\" float,\\nPRIMARY KEY (\"Cinema_ID\",\"Film_ID\"),\\nFOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),\\nFOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد السينمات التي لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM cinema\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي الأعمار المميزة للطلاب الذين لديهم تصويت لأمين السر في دورة الانتخابات الخريفية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما الآلة المستخدمة بشكل أكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الأفعوانيات وأسماء البلدان التي يوجدون فيها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nأيّ من مؤلفي الدورات يدرّسون دورتين أو أكثر؟ قدّم لي عناوينهم ومعرّفاتهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nأي المعلمين يدرسون الطالب المسمى EVELINA BROMLEY؟ أعطني الاسم الأول والعائلي للمعلمين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"EVELINA\" AND T1.lastname = \"BROMLEY\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام تعريفية الطلاب الذين قاموا بتسجيل دورات أو حضورها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هو رقم التعريف الشخصي للمدرس الذي يُشرف على جميع الطلاب من قسم التاريخ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nأي عملاء لديهم كل من 'On Road' و 'Shipped' كحالة للطلبات؟ قم بتسجيل معرفات العملاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأذكر اسم كل متبرع ومبلغ التبرع بترتيب تنازلي لمبلغ التبرع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر أسماء الضيوف الأولى وتواريخ البداية وتواريخ النهاية لجميع حجوزات الشقق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن عدد الطلاب للمدن التي تحتوي على أكثر من طالب واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , avg(age) , city_code FROM student WHERE sex = 'M' GROUP BY city_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nما هي التكلفة الأعلى، والتكلفة الأدنى، والتكلفة المتوسطة للإجراءات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هي المعرفات والتفاصيل لجميع المؤسسات التي لديها منح بأكثر من 6000 دولار؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nاعثر على اسم السكن الذي لديه أكبر طاقة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي الأسماء المختلفة لجميع الأغاني دون أصوات خلفية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Is_Male\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'church': 'CREATE TABLE \"church\" (\\n\"Church_ID\" int,\\n\"Name\" text,\\n\"Organized_by\" text,\\n\"Open_Date\" int,\\n\"Continuation_of\" text,\\nPRIMARY KEY (\"Church_ID\")\\n)', 'wedding': 'CREATE TABLE \"wedding\" (\\n\"Church_ID\" int,\\n\"Male_ID\" int,\\n\"Female_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Church_ID\",\"Male_ID\",\"Female_ID\"),\\nFOREIGN KEY (\"Church_ID\") REFERENCES `church`(\"Church_ID\"),\\nFOREIGN KEY (\"Male_ID\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Female_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nاعرض الأسماء لجميع الإناث من كندا اللواتي أقمن حفل زفاف في عام 2016.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Title\" text,\\n\"Studio\" text,\\n\"Director\" text,\\n\"Gross_in_dollar\" int,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"Country\" text,\\n\"Number_cities\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'film_market_estimation': 'CREATE TABLE \"film_market_estimation\" (\\n\"Estimation_ID\" int,\\n\"Low_Estimate\" real,\\n\"High_Estimate\" real,\\n\"Film_ID\" int,\\n\"Type\" text,\\n\"Market_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Estimation_ID\"),\\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\\n)'}\n\n## User-Prompt:\nيرجى عرض عناوين الأفلام وأنواع تقديرات السوق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Country FROM market ORDER BY Number_cities DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر عدد المعاملات برمز نوع المعاملة SALE للمستثمرين المختلفين إذا كان أكبر من 0.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nما هو اسم أعلى تصنيف للنبيذ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'train': 'CREATE TABLE \"train\" (\\n \"id\" int,\\n \"train_number\" int,\\n \"name\" text,\\n \"origin\" text,\\n \"destination\" text,\\n \"time\" text,\\n \"interval\" text,\\n primary key (\"id\")\\n)', 'station': 'CREATE TABLE \"station\" (\\n \"id\" int,\\n \"network_name\" text,\\n \"services\" text,\\n \"local_authority\" text,\\n primary key (\"id\")\\n)', 'route': 'CREATE TABLE \"route\" (\\n \"train_id\" int,\\n \"station_id\" int,\\n primary key (\"train_id\", \"station_id\"),\\n foreign key (\"train_id\") references `train`(\"id\"),\\n foreign key (\"station_id\") references `station`(\"id\")\\n)', 'weekly_weather': 'CREATE TABLE \"weekly_weather\" (\\n \"station_id\" int,\\n \"day_of_week\" text,\\n \"high_temperature\" int,\\n \"low_temperature\" int,\\n \"precipitation\" real,\\n \"wind_speed_mph\" int,\\n primary key (\"station_id\", \"day_of_week\"),\\n foreign key (\"station_id\") references \"station\"(\"id\")\\n)'}\n\n## User-Prompt:\nما هو عدد القطارات التي تبدأ من كل نقطة انطلاق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT train_number , TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو الراتب واسم الموظف الذي يحمل شهادات لطيارة الطائرات الأكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nأي فصل دراسي وسنة كان بها أقل عدد من الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'department': 'CREATE TABLE \"department\" (\\n\"Department_ID\" int,\\n\"Name\" text,\\n\"Creation\" text,\\n\"Ranking\" int,\\n\"Budget_in_Billions\" real,\\n\"Num_Employees\" real,\\nPRIMARY KEY (\"Department_ID\")\\n)', 'head': 'CREATE TABLE \"head\" (\\n\"head_ID\" int,\\n\"name\" text,\\n\"born_state\" text,\\n\"age\" real,\\nPRIMARY KEY (\"head_ID\")\\n)', 'management': 'CREATE TABLE \"management\" (\\n\"department_ID\" int,\\n\"head_ID\" int,\\n\"temporary_acting\" text,\\nPRIMARY KEY (\"Department_ID\",\"head_ID\"),\\nFOREIGN KEY (\"Department_ID\") REFERENCES `department`(\"Department_ID\"),\\nFOREIGN KEY (\"head_ID\") REFERENCES `head`(\"head_ID\")\\n)'}\n\n## User-Prompt:\nما هي أقصى وأدنى ميزانية للأقسام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(budget_in_billions) , min(budget_in_billions) FROM department\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي معرّفات المراجعين الذين لم يقدّموا فقط تقييم بـ 4 نجوم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nأي تخصص لديه أكبر عدد من الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nكم نشاطًا يشارك فيها مارك جوليانو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nما هي المواضيع والسنوات للمعارض، مرتبة حسب سعر التذكرة بتنازل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هو عنوان الدورة وعدد الوحدات الدراسية للدورة التي يدرسها في أكبر فصل دراسي (بأعلى سعة)؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الملاعب التي زارها بعض السباحين الأستراليين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nما هي معرفات الحسابات ومعرفات العملاء وأسماء الحسابات لجميع الحسابات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT account_id , customer_id , account_name FROM Accounts\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هو عدد الولايات التي بها طلاب في الكليات يلعبون في مركز وسط الملعب ولكن ليس كحراس مرمى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nما هو اسم المنظمة التي نشرت أكبر عدد من الأوراق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nابحث عن أسماء جميع الكليات التي تكون تسجيل طلابها أكبر من تسجيل كل الكليات في ولاية فلوريدا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بأسماء المؤلفين للتقديمات بترتيب تصاعدي حسب النقاط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM submission\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأظهر جميع المستشارين وعدد الطلاب المقابل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT advisor , count(*) FROM Student GROUP BY advisor\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو الاسم الأخير للطالب الذي حصل على درجة أ في الصف برمز 10018؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.emp_fname , T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nمن قام بآخر طلب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = \"Cancelled\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nأي المدارس تحتوي على أكثر من لاعب واحد؟ أعطني مواقع المدارس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n \"People_ID\" int,\\n \"Age\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Graduation_College\" text,\\n PRIMARY KEY (\"People_ID\")\\n)', 'company': 'CREATE TABLE \"company\" (\\n \"Company_ID\" real,\\n \"Name\" text,\\n \"Headquarters\" text,\\n \"Industry\" text,\\n \"Sales_in_Billion\" real,\\n \"Profits_in_Billion\" real,\\n \"Assets_in_Billion\" real,\\n \"Market_Value_in_Billion\" real,\\n PRIMARY KEY (\"Company_ID\")\\n)', 'employment': 'CREATE TABLE \"employment\" (\\n \"Company_ID\" int,\\n \"People_ID\" int,\\n \"Year_working\" int,\\n PRIMARY KEY (\"Company_ID\",\"People_ID\"),\\n FOREIGN KEY (\"Company_ID\") REFERENCES `company`(\"Company_ID\"),\\n FOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الموظفين الذين يعملون لدى شركات تفوق مبيعاتها 200.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'chip_model': 'CREATE TABLE \"chip_model\" (\\n\"Model_name\" text,\\n\"Launch_year\" real,\\n\"RAM_MiB\" real,\\n\"ROM_MiB\" real,\\n\"Slots\" text,\\n\"WiFi\" text,\\n\"Bluetooth\" text,\\nPRIMARY KEY (\"Model_name\")\\n)', 'screen_mode': 'CREATE TABLE \"screen_mode\" (\\n\"Graphics_mode\" real,\\n\"Char_cells\" text,\\n\"Pixels\" text,\\n\"Hardware_colours\" real,\\n\"used_kb\" real,\\n\"map\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"Graphics_mode\")\\n)', 'phone': 'CREATE TABLE \"phone\" (\\n\"Company_name\" text,\\n\"Hardware_Model_name\" text,\\n\"Accreditation_type\" text,\\n\"Accreditation_level\" text,\\n\"Date\" text,\\n\"chip_model\" text,\\n\"screen_mode\" text,\\nPRIMARY KEY(\"Hardware_Model_name\"),\\nFOREIGN KEY (`screen_mode`) REFERENCES `screen_mode`(`Graphics_mode`),\\nFOREIGN KEY (`chip_model`) REFERENCES `chip_model`(`Model_name`)\\n)'}\n\n## User-Prompt:\nابحث عن عدد البيكسل لأوضاع الشاشة التي يتم استخدامها من قبل الهواتف ذات أنواع التصديق الكاملة والهواتف ذات أنواع التصديق المؤقتة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nقائمة تاريخ الافتتاح للمتجر المسمى آبل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT Software_Platform) FROM device\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هو عنوان الدورة التي تعتبر شرطًا مسبقًا للحوسبة المتنقلة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي عناوين جميع الأفلام التي لم يتم مراجعتها بواسطة كريس جاكسون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM Reviewer UNION SELECT title FROM Movie\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nاعرض قائمة بأسماء الدورات بترتيب أبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT course_name FROM courses ORDER BY course_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nكم عدد الموظفين بالمجموع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM employee\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nكم منتج له لونه موصوف بأنه 'أبيض' أو له خاصية تسمى 'حار'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"white\" OR t3.characteristic_name = \"hot\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'manufacturer': 'CREATE TABLE \"manufacturer\" (\\n \"Manufacturer_ID\" int,\\n \"Open_Year\" real,\\n \"Name\" text,\\n \"Num_of_Factories\" int,\\n \"Num_of_Shops\" int,\\n PRIMARY KEY (\"Manufacturer_ID\")\\n)', 'furniture': 'CREATE TABLE \"furniture\" (\\n \"Furniture_ID\" int,\\n \"Name\" text,\\n \"Num_of_Component\" int,\\n \"Market_Rate\" real,\\n PRIMARY KEY (\"Furniture_ID\")\\n)', 'furniture_manufacte': 'CREATE TABLE \"furniture_manufacte\" (\\n \"Manufacturer_ID\" int,\\n \"Furniture_ID\" int,\\n \"Price_in_Dollar\" real,\\n PRIMARY KEY (\"Manufacturer_ID\",\"Furniture_ID\"),\\n FOREIGN KEY (\"Manufacturer_ID\") REFERENCES `manufacturer`(\"Manufacturer_ID\"),\\n FOREIGN KEY (\"Furniture_ID\") REFERENCES `furniture`(\"Furniture_ID\")\\n)'}\n\n## User-Prompt:\nما هو رقم الهوية وعدد المتاجر للشركة التي تنتج أغلى الأثاث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'journal': 'CREATE TABLE \"journal\" (\\n\"Journal_ID\" int,\\n\"Date\" text,\\n\"Theme\" text,\\n\"Sales\" int,\\nPRIMARY KEY (\"Journal_ID\")\\n)', 'editor': 'CREATE TABLE \"editor\" (\\n\"Editor_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\nPRIMARY KEY (\"Editor_ID\")\\n)', 'journal_committee': 'CREATE TABLE \"journal_committee\" (\\n\"Editor_ID\" int,\\n\"Journal_ID\" int,\\n\"Work_Type\" text,\\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\\n)'}\n\n## User-Prompt:\nإظهار أسماء المحررين وموضوعات السجلات التي يخدمون في لجانها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nاعثر على أسماء العملاء الأخيرة التي ليست لديها مجموع فواتير يتجاوز 20.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'chip_model': 'CREATE TABLE \"chip_model\" (\\n\"Model_name\" text,\\n\"Launch_year\" real,\\n\"RAM_MiB\" real,\\n\"ROM_MiB\" real,\\n\"Slots\" text,\\n\"WiFi\" text,\\n\"Bluetooth\" text,\\nPRIMARY KEY (\"Model_name\")\\n)', 'screen_mode': 'CREATE TABLE \"screen_mode\" (\\n\"Graphics_mode\" real,\\n\"Char_cells\" text,\\n\"Pixels\" text,\\n\"Hardware_colours\" real,\\n\"used_kb\" real,\\n\"map\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"Graphics_mode\")\\n)', 'phone': 'CREATE TABLE \"phone\" (\\n\"Company_name\" text,\\n\"Hardware_Model_name\" text,\\n\"Accreditation_type\" text,\\n\"Accreditation_level\" text,\\n\"Date\" text,\\n\"chip_model\" text,\\n\"screen_mode\" text,\\nPRIMARY KEY(\"Hardware_Model_name\"),\\nFOREIGN KEY (`screen_mode`) REFERENCES `screen_mode`(`Graphics_mode`),\\nFOREIGN KEY (`chip_model`) REFERENCES `chip_model`(`Model_name`)\\n)'}\n\n## User-Prompt:\nكم عدد نماذج الأجهزة الهاتفية التي تنتجها الشركة المسماة شركة نوكيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM phone WHERE Company_name = \"Nokia Corporation\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'item': 'CREATE TABLE `item` (\\n `i_id` integer NOT NULL\\n, `title` varchar(20) DEFAULT NULL\\n, PRIMARY KEY (`i_id`)\\n)', 'review': 'CREATE TABLE `review` (\\n `a_id` integer NOT NULL PRIMARY KEY\\n, `u_id` integer NOT NULL\\n, `i_id` integer NOT NULL\\n, `rating` integer DEFAULT NULL\\n, `rank` integer DEFAULT NULL\\n, \\tFOREIGN KEY (`u_id`) REFERENCES `useracct`(`u_id`)\\n, \\tFOREIGN KEY (`i_id`) REFERENCES `item`(`i_id`)\\n)', 'useracct': 'CREATE TABLE `useracct` (\\n `u_id` integer NOT NULL\\n, `name` varchar(128) DEFAULT NULL\\n, PRIMARY KEY (`u_id`)\\n)', 'trust': 'CREATE TABLE \"trust\" (`source_u_id` integer NOT NULL, `target_u_id` integer NOT NULL, `trust` integer NOT NULL, FOREIGN KEY (`source_u_id`) REFERENCES `useracct`(`u_id`), FOREIGN KEY (`target_u_id`) REFERENCES `useracct`(`u_id`))'}\n\n## User-Prompt:\nما هو عدد المستخدمين الذين لم يكتبوا أي مراجعة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nإرجاع الأسماء المميزة للعملاء الذين يكون حالة طلباتهم معلقة، مرتبة حسب معرف العميل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nابحث عن الفصول الدراسية التي يدرس فيها الصف الرابع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT classroom FROM list WHERE grade = 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هي الدول الثلاث التي يأتي منها أقل عدد من اللاعبين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'architect': 'CREATE TABLE \"architect\" (\\n\"id\" text,\\n\"name\" text,\\n\"nationality\" text,\\n\"gender\" text,\\nprimary key(\"id\")\\n)', 'bridge': 'CREATE TABLE \"bridge\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"name\" text,\\n\"location\" text,\\n\"length_meters\" real,\\n\"length_feet\" real,\\nprimary key(\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)', 'mill': 'CREATE TABLE \"mill\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"location\" text,\\n\"name\" text,\\n\"type\" text,\\n\"built_year\" int,\\n\"notes\" text,\\nprimary key (\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)'}\n\n## User-Prompt:\nما هو النوع الأكثر شيوعًا من المطاحن، وكم عددها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM mill WHERE name LIKE '%Moulin%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هو اسم نوع الوثيقة ووصف نوع الوثيقة وتاريخ الإنشاء لجميع الوثائق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي المعرفات للدورات التي تم تقديمها في كل من خريف عام 2009 وربيع عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي الأسماء المختلفة لجميع الأغاني التي تمتلك دقة أعلى من الأغاني الإنجليزية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هو إجمالي مبلغ المنح للمؤسسات المصنفة كبحث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسعار الوحدة المتميزة للمسارات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT distinct(UnitPrice) FROM TRACK\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Address_Types': 'CREATE TABLE `Ref_Address_Types` (\\n`address_type_code` VARCHAR(15) PRIMARY KEY,\\n`address_type_description` VARCHAR(80)\\n)', 'Ref_Detention_Type': 'CREATE TABLE `Ref_Detention_Type` (\\n`detention_type_code` VARCHAR(10) PRIMARY KEY,\\n`detention_type_description` VARCHAR(80)\\n)', 'Ref_Incident_Type': 'CREATE TABLE `Ref_Incident_Type` (\\n`incident_type_code` VARCHAR(10) PRIMARY KEY,\\n`incident_type_description` VARCHAR(80)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1` VARCHAR(120),\\n`line_2` VARCHAR(120),\\n`line_3` VARCHAR(120),\\n`city` VARCHAR(80),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(40),\\n`last_name` VARCHAR(40),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`date_first_rental` DATETIME,\\n`date_left_university` DATETIME,\\n`other_student_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Teachers': 'CREATE TABLE `Teachers` (\\n`teacher_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender` VARCHAR(1),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Assessment_Notes': 'CREATE TABLE `Assessment_Notes` (\\n`notes_id` INTEGER NOT NULL ,\\n`student_id` INTEGER,\\n`teacher_id` INTEGER NOT NULL,\\n`date_of_notes` DATETIME,\\n`text_of_notes` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Behavior_Incident': 'CREATE TABLE `Behavior_Incident` (\\n`incident_id` INTEGER PRIMARY KEY,\\n`incident_type_code` VARCHAR(10) NOT NULL,\\n`student_id` INTEGER NOT NULL,\\n`date_incident_start` DATETIME,\\n`date_incident_end` DATETIME,\\n`incident_summary` VARCHAR(255),\\n`recommendations` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Detention': 'CREATE TABLE `Detention` (\\n`detention_id` INTEGER PRIMARY KEY,\\n`detention_type_code` VARCHAR(10) NOT NULL,\\n`teacher_id` INTEGER,\\n`datetime_detention_start` DATETIME,\\n`datetime_detention_end` DATETIME,\\n`detention_summary` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Student_Addresses': 'CREATE TABLE `Student_Addresses` (\\n`student_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`date_address_to` DATETIME,\\n`monthly_rental` DECIMAL(19,4),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Students_in_Detention': 'CREATE TABLE `Students_in_Detention` (\\n`student_id` INTEGER NOT NULL,\\n`detention_id` INTEGER NOT NULL,\\n`incident_id` INTEGER NOT NULL,\\nFOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),\\nFOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)'}\n\n## User-Prompt:\nما هو البريد الإلكتروني للطالبة التي يكون اسمها إيما واسم عائلتها روهان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT cell_mobile_number , email_address FROM STUDENTS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام تعريفية الطلاب الذين سجلوا في الدورة 301 مؤخرًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر جميع التواريخ وعدد الأسهم للمعاملات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(amount_of_transaction) FROM TRANSACTIONS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Representative_ID\" int,\\n\"Date\" text,\\n\"Votes\" real,\\n\"Vote_Percent\" real,\\n\"Seats\" real,\\n\"Place\" real,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\\n)', 'representative': 'CREATE TABLE \"representative\" (\\n\"Representative_ID\" int,\\n\"Name\" text,\\n\"State\" text,\\n\"Party\" text,\\n\"Lifespan\" text,\\nPRIMARY KEY (\"Representative_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الأحزاب التي لديها كل من النواب في ولاية نيويورك والنواب في ولاية بنسلفانيا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Party FROM representative WHERE State = \"New York\" INTERSECT SELECT Party FROM representative WHERE State = \"Pennsylvania\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nابحث عن عدد المطارات التي يحتوي اسمها على كلمة 'International'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM airports ORDER BY elevation DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nاستعرض جميع أسماء البلدان والدوريات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nما هي العناوين والمؤلفين أو المحررين التي تتوافق مع الكتب التي تم إنتاجها بعد عام 1989؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM book_club\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nأعطني متوسط أسعار النبيذ الذي يتم إنتاجه من قبل التسميات في مقاطعة سونوما؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما عدد الجامعات التي يكون رسم الحرم الجامعي لديها أعلى من متوسط رسوم الحرم الجامعي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'candidate': 'CREATE TABLE \"candidate\" (\\n\"Candidate_ID\" int,\\n\"People_ID\" int,\\n\"Poll_Source\" text,\\n\"Date\" text,\\n\"Support_rate\" real,\\n\"Consider_rate\" real,\\n\"Oppose_rate\" real,\\n\"Unsure_rate\" real,\\nPRIMARY KEY (\"Candidate_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Sex\" text,\\n\"Name\" text,\\n\"Date_of_Birth\" text,\\n\"Height\" real,\\n\"Weight\" real,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هو المتوسط والحد الأدنى للوزن لكل جنس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM people WHERE height > 200 OR height < 190\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي أسماء المراجعين، وعناوين الأفلام، وعدد النجوم، وتاريخ التقييم؟ وقم بفرز البيانات أولاً حسب اسم المراجع، ثم حسب عنوان الفيلم، وأخيرًا حسب عدد النجوم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.title , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = \"James Cameron\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nالعثور على أسماء العائلة لأعضاء هيئة التدريس الذين هم أعضاء في قسم علوم الحاسوب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Fname , T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nأعط فترات مختلفة للمصارعين الذين ليسوا في Tokyo، Japan.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT Reign FROM wrestler WHERE LOCATION != \"Tokyo , Japan\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو اسم البلد الذي يمتلك أكبر عدد من شركات الطيران المحلية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Third_Party_Companies': 'CREATE TABLE `Third_Party_Companies` (\\n`company_id` INTEGER PRIMARY KEY ,\\n`company_type` VARCHAR(5) NOT NULL,\\n`company_name` VARCHAR(255),\\n`company_address` VARCHAR(255),\\n`other_company_details` VARCHAR(255)\\n)', 'Maintenance_Contracts': 'CREATE TABLE `Maintenance_Contracts` (\\n`maintenance_contract_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_company_id` INTEGER NOT NULL,\\n`contract_start_date` DATETIME,\\n`contract_end_date` DATETIME,\\n`other_contract_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Parts': 'CREATE TABLE `Parts` (\\n`part_id` INTEGER PRIMARY KEY,\\n`part_name` VARCHAR(255),\\n`chargeable_yn` VARCHAR(1),\\n`chargeable_amount` VARCHAR(20),\\n`other_part_details` VARCHAR(255)\\n)', 'Skills': 'CREATE TABLE `Skills` (\\n`skill_id` INTEGER PRIMARY KEY,\\n`skill_code` VARCHAR(20),\\n`skill_description` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_name` VARCHAR(255),\\n`gender` VARCHAR(1),\\n`other_staff_details` VARCHAR(255)\\n)', 'Assets': 'CREATE TABLE `Assets` (\\n`asset_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_id` INTEGER NOT NULL,\\n`supplier_company_id` INTEGER NOT NULL,\\n`asset_details` VARCHAR(255),\\n`asset_make` VARCHAR(20),\\n`asset_model` VARCHAR(20),\\n`asset_acquired_date` DATETIME,\\n`asset_disposed_date` DATETIME,\\n`other_asset_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_id` )\\nREFERENCES `Maintenance_Contracts`(`maintenance_contract_id` ),\\nFOREIGN KEY (`supplier_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Asset_Parts': 'CREATE TABLE `Asset_Parts` (\\n`asset_id` INTEGER NOT NULL,\\n`part_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` ),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` )\\n)', 'Maintenance_Engineers': 'CREATE TABLE `Maintenance_Engineers` (\\n`engineer_id` INTEGER PRIMARY KEY,\\n`company_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(50),\\n`last_name` VARCHAR(50),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Engineer_Skills': 'CREATE TABLE `Engineer_Skills` (\\n`engineer_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)', 'Fault_Log': 'CREATE TABLE `Fault_Log` (\\n`fault_log_entry_id` INTEGER PRIMARY KEY,\\n`asset_id` INTEGER NOT NULL,\\n`recorded_by_staff_id` INTEGER NOT NULL,\\n`fault_log_entry_datetime` DATETIME,\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` ),\\nFOREIGN KEY (`recorded_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Engineer_Visits': 'CREATE TABLE `Engineer_Visits` (\\n`engineer_visit_id` INTEGER PRIMARY KEY,\\n`contact_staff_id` INTEGER,\\n`engineer_id` INTEGER NOT NULL,\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\n`visit_start_datetime` DATETIME,\\n`visit_end_datetime` DATETIME,\\n`other_visit_details` VARCHAR(255),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` ),\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`contact_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Part_Faults': 'CREATE TABLE `Part_Faults` (\\n`part_fault_id` INTEGER PRIMARY KEY,\\n`part_id` INTEGER NOT NULL,\\n`fault_short_name` VARCHAR(20),\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` )\\n)', 'Fault_Log_Parts': 'CREATE TABLE `Fault_Log_Parts` (\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`part_fault_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` )\\n)', 'Skills_Required_To_Fix': 'CREATE TABLE `Skills_Required_To_Fix` (\\n`part_fault_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)'}\n\n## User-Prompt:\nأي جزء يحمل أقل مبلغ مدفوع؟ أذكر معرف الجزء والمبلغ.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT asset_make , asset_model , asset_details FROM Assets ORDER BY asset_disposed_date ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nاعثر على أعداد التخصصات المختلفة والمدن.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dorm_name , gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nلكل بلد، ما هو متوسط ارتفاع مطارات تلك البلد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nابحث عن بلد الشركات الجوية التي تبدأ اسمها بـ 'Orbit'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هو اسم وجنس الموظف الذي تم تعيينه في عام 2016؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع المدن والولايات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nقم بفرز جميع المنتجات المميزة بترتيب أبجدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nلكل نوع من أنواع الأسرة، ابحث عن متوسط سعر الغرفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nاعرض معرّفات الطلب والكمية الإجمالية في كل طلب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nكم عدد الأغاني التي تحتوي على صوت رئيسي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Demon Kitty Rag\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nأظهر الهويات لجميع أعضاء هيئة التدريس الذين لديهم على الأقل طالبين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nمن فضلك، أظهر أسماء ولاعبي الأندية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM club ORDER BY name DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هو عنوان الموقع UK Gallery؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(price_range) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nمن هم أفضل 3 لاعبين من حيث التقييم العام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nأي طلب يحمل رقم تتبع الشحن 3452؟ أعطني معرف الطلب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأذكر الاسم، الموقع، والشعار لجميع المدارس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT school_name , LOCATION , mascot FROM school\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى للسائقين المختلفين الذين فازوا في المركز الأول كسائقين متصدرين وكانت لديهم أكثر من 20 نقطة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nارجع كل رمز لنوع الشقة مع العدد الأقصى والأدنى للغرف بين كل نوع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nابحث عن نوع بيانات السمة التي تحمل اسم Green.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = \"Green\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nمن فضلك قدم اسم الغرفة وعدد المرات التي تم فيها إجراء الحجوزات لكل غرفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هو رقم تعريفى الطلاب الذين سجلوا في بعض الدورات ولكن أقل عدد من الدورات بين هؤلاء الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الرسمية للمدن التي استضافت أكثر من مسابقة واحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي المستشارين المميزين للطلاب الذين لديهم تصويت لأمين الصندوق في دورة الانتخابات الربيعية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = \"Fall\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي أسماء المدرسين في قسم علوم الحاسوب الذين يكسبون أكثر من 80000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nأي وزير غادر المنصب في أحدث وقت؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT minister FROM party ORDER BY left_office DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هي أسماء العائلة للطالبات، مرتبة حسب العمر بترتيب تنازلي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LName FROM STUDENT WHERE Sex = \"F\" ORDER BY Age DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nقائمة بجميع أنواع الوسائط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM media_types;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nعدد العناوين في منطقة كاليفورنيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM address WHERE district = 'California'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nكم عدد الدورات المقدمة في كل فصل دراسي وسنة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , semester , YEAR FROM SECTION GROUP BY semester , YEAR\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأظهر معرف الطالب لأكبر طالب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nمتى أصبحت كارول برنهارد عميلة للمرة الأولى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي أسماء جميع الأقسام التي لديها فعلاً موظف واحد أو أكثر معيّنين لها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nلكل فصل دراسي في الصف الأول، ارجع رقم الفصل الدراسي وعدد الطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT classroom , count(*) FROM list WHERE grade = \"0\" GROUP BY classroom\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nما هي أسماء اللاعبين الذين لديهم أفضل مهارة الكرة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = ( SELECT max(overall_rating) FROM Player_Attributes)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nStaff_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Staff_ID)\\n)', 'Policies': 'CREATE TABLE Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATETIME,\\nEnd_Date DATETIME,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claim_Headers': 'CREATE TABLE Claim_Headers (\\nClaim_Header_ID INTEGER NOT NULL,\\nClaim_Status_Code CHAR(15) NOT NULL,\\nClaim_Type_Code CHAR(15) NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_of_Claim DATETIME,\\nDate_of_Settlement DATETIME,\\nAmount_Claimed DECIMAL(20,4),\\nAmount_Piad DECIMAL(20,4),\\nPRIMARY KEY (Claim_Header_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Policies (Policy_ID)\\n)', 'Claims_Documents': 'CREATE TABLE Claims_Documents (\\nClaim_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nCreated_by_Staff_ID INTEGER,\\nCreated_Date INTEGER,\\nPRIMARY KEY (Claim_ID, Document_Type_Code),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Created_by_Staff_ID) REFERENCES Staff (Staff_ID)\\n)', 'Claims_Processing_Stages': 'CREATE TABLE Claims_Processing_Stages (\\nClaim_Stage_ID INTEGER NOT NULL,\\nNext_Claim_Stage_ID INTEGER,\\nClaim_Status_Name VARCHAR(255) NOT NULL,\\nClaim_Status_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Claim_Stage_ID)\\n)', 'Claims_Processing': 'CREATE TABLE Claims_Processing (\\nClaim_Processing_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nClaim_Outcome_Code CHAR(15) NOT NULL,\\nClaim_Stage_ID INTEGER NOT NULL,\\nStaff_ID INTEGER,\\nPRIMARY KEY (Claim_Processing_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Staff_ID) REFERENCES Staff (Staff_ID)\\n)'}\n\n## User-Prompt:\nأي زبون قدم أكبر مبلغ مطالبة في مطالبة واحدة؟ أعد تفاصيل الزبون.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'body_builder': 'CREATE TABLE \"body_builder\" (\\n\"Body_Builder_ID\" int,\\n\"People_ID\" int,\\n\"Snatch\" real,\\n\"Clean_Jerk\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Body_Builder_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Birth_Date\" text,\\n\"Birth_Place\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nأذكر النقاط الإجمالية لبناة الأجسام بترتيب تصاعدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Total FROM body_builder ORDER BY Total ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"District\" text,\\n\"Name\" text,\\n\"Party\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'debate': 'CREATE TABLE \"debate\" (\\n\"Debate_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Debate_ID\")\\n)', 'debate_people': 'CREATE TABLE \"debate_people\" (\\n\"Debate_ID\" int,\\n\"Affirmative\" int,\\n\"Negative\" int,\\n\"If_Affirmative_Win\" bool,\\nPRIMARY KEY (\"Debate_ID\",\"Affirmative\",\"Negative\"),\\nFOREIGN KEY (\"Debate_ID\") REFERENCES `debate`(\"Debate_ID\"),\\nFOREIGN KEY (\"Affirmative\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Negative\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بأسماء الأشخاص الذين لم يكونوا في الجانب الموافق للمناظرات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي عناوين الأفلام وتقييماتها المتوسطة لجميع الأفلام التي تمتلك أدنى تقييم متوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nكم عدد الطلاب في فصل واحد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , classroom FROM list GROUP BY classroom\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nالتالي: ما هي أسماء المرضى الذين يقيمون في الغرفة 111 ويخضعون لعلاج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأعطني الحد الأدنى والحد الأقصى لعدد الحمامات بين جميع الشقق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT min(bathroom_count) , max(bathroom_count) FROM Apartments\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هو عدد الطلاب الذين يلعبون دور حارس المرمى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM tryout WHERE pPos = 'goalie'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بجميع المدارس وأسمائها اللقبية بترتيب سنة التأسيس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT school , nickname FROM university ORDER BY founded\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nما هو اسم والمنصب للرئيس الذي يدير قسم يحتوي على أقل عدد من الموظفين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nStaff_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Staff_ID)\\n)', 'Policies': 'CREATE TABLE Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATETIME,\\nEnd_Date DATETIME,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claim_Headers': 'CREATE TABLE Claim_Headers (\\nClaim_Header_ID INTEGER NOT NULL,\\nClaim_Status_Code CHAR(15) NOT NULL,\\nClaim_Type_Code CHAR(15) NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_of_Claim DATETIME,\\nDate_of_Settlement DATETIME,\\nAmount_Claimed DECIMAL(20,4),\\nAmount_Piad DECIMAL(20,4),\\nPRIMARY KEY (Claim_Header_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Policies (Policy_ID)\\n)', 'Claims_Documents': 'CREATE TABLE Claims_Documents (\\nClaim_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nCreated_by_Staff_ID INTEGER,\\nCreated_Date INTEGER,\\nPRIMARY KEY (Claim_ID, Document_Type_Code),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Created_by_Staff_ID) REFERENCES Staff (Staff_ID)\\n)', 'Claims_Processing_Stages': 'CREATE TABLE Claims_Processing_Stages (\\nClaim_Stage_ID INTEGER NOT NULL,\\nNext_Claim_Stage_ID INTEGER,\\nClaim_Status_Name VARCHAR(255) NOT NULL,\\nClaim_Status_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Claim_Stage_ID)\\n)', 'Claims_Processing': 'CREATE TABLE Claims_Processing (\\nClaim_Processing_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nClaim_Outcome_Code CHAR(15) NOT NULL,\\nClaim_Stage_ID INTEGER NOT NULL,\\nStaff_ID INTEGER,\\nPRIMARY KEY (Claim_Processing_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Staff_ID) REFERENCES Staff (Staff_ID)\\n)'}\n\n## User-Prompt:\nالعثور على عدد السجلات لكل نوع من أنواع السياسات ورمز نوعها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nكم عدد المنتجات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هي أسماء جميع الطائرات التي تقوم بما لا يقل عن 2 رحلة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو رقم تعريف طلب أُجري مؤخرًا بشكل أكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nعدد المعاملات المالية التي تتوافق مع كل هوية حساب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , account_id FROM Financial_transactions\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nاعرض المعرف، والأسماء الأولى والأخيرة لجميع العملاء الذين يمتلكون ما لا يقل عن بطاقتين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'railway': 'CREATE TABLE \"railway\" (\\n\"Railway_ID\" int,\\n\"Railway\" text,\\n\"Builder\" text,\\n\"Built\" text,\\n\"Wheels\" text,\\n\"Location\" text,\\n\"ObjectNumber\" text,\\nPRIMARY KEY (\"Railway_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Train_Num\" text,\\n\"Name\" text,\\n\"From\" text,\\n\"Arrival\" text,\\n\"Railway_ID\" int,\\nPRIMARY KEY (\"Train_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES `railway`(\"Railway_ID\")\\n)', 'manager': 'CREATE TABLE \"manager\" (\\n\"Manager_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Working_year_starts\" text,\\n\"Age\" int,\\n\"Level\" int,\\nPRIMARY KEY (\"Manager_ID\")\\n)', 'railway_manage': 'CREATE TABLE \"railway_manage\" (\\n\"Railway_ID\" int,\\n\"Manager_ID\" int,\\n\"From_Year\" text,\\nPRIMARY KEY (\"Railway_ID\",\"Manager_ID\"),\\nFOREIGN KEY (\"Manager_ID\") REFERENCES \"manager\"(\"Manager_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES \"railway\"(\"Railway_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الدول التي تحتوي على مديرين تتجاوز أعمارهم الخمسين أو تقل أعمارهم عن 46.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Working_year_starts FROM manager ORDER BY LEVEL DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي الهويات لجميع الطلاب الذين لديهم رقم مستشار 1121؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Student WHERE Advisor = 1121\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'festival_detail': 'CREATE TABLE \"festival_detail\" (\\n\"Festival_ID\" int,\\n\"Festival_Name\" text,\\n\"Chair_Name\" text,\\n\"Location\" text,\\n\"Year\" int,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Festival_ID\")\\n)', 'artwork': 'CREATE TABLE artwork (\\n\"Artwork_ID\" int,\\n\"Type\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Artwork_ID\")\\n)', 'nomination': 'CREATE TABLE nomination (\\n\"Artwork_ID\" int,\\n\"Festival_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Artwork_ID\",\"Festival_ID\"),\\nFOREIGN KEY (\"Artwork_ID\") REFERENCES `artwork`(\"Artwork_ID\"),\\nFOREIGN KEY (\"Festival_ID\") REFERENCES `festival_detail`(\"Festival_ID\")\\n)'}\n\n## User-Prompt:\nقائمة النوع الأكثر شيوعًا من الأعمال الفنية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE , COUNT(*) FROM artwork GROUP BY TYPE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nفي أي بلد يقع المطار الذي يمتلك أعلى ارتفاع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM airports WHERE elevation BETWEEN -50 AND 50\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي جميع المقرات التي تحتوي على شركة في صناعة البنوك وشركة في صناعة النفط والغاز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nما هي أسماء العلماء، وكم عدد المشاريع التي يعمل كل منهم فيها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nإرجاع معرفات جميع المنتجات التي تم طلبها أكثر من ثلاث مرات أو تم توريدها بأكثر من 80000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هي أرقام هواتف الأقسام في الغرفة 268؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM DEPARTMENT WHERE Division = \"AS\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nارجع إلى تفاصيل الحساب ذات القيمة الأكبر، بالإضافة إلى تلك التي تتضمن الحرف 5.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هو متوسط الرسوم على حرم جامعة كاليفورنيا الحكومية في عام ٢٠٠٥؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هي التفاصيل وساعات الافتتاح للمتاحف؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'festival_detail': 'CREATE TABLE \"festival_detail\" (\\n\"Festival_ID\" int,\\n\"Festival_Name\" text,\\n\"Chair_Name\" text,\\n\"Location\" text,\\n\"Year\" int,\\n\"Num_of_Audience\" int,\\nPRIMARY KEY (\"Festival_ID\")\\n)', 'artwork': 'CREATE TABLE artwork (\\n\"Artwork_ID\" int,\\n\"Type\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Artwork_ID\")\\n)', 'nomination': 'CREATE TABLE nomination (\\n\"Artwork_ID\" int,\\n\"Festival_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Artwork_ID\",\"Festival_ID\"),\\nFOREIGN KEY (\"Artwork_ID\") REFERENCES `artwork`(\"Artwork_ID\"),\\nFOREIGN KEY (\"Festival_ID\") REFERENCES `festival_detail`(\"Festival_ID\")\\n)'}\n\n## User-Prompt:\nعرض أنواع فنون الأعمال المرشحة في المهرجانات في عام 2007.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name , T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'chip_model': 'CREATE TABLE \"chip_model\" (\\n\"Model_name\" text,\\n\"Launch_year\" real,\\n\"RAM_MiB\" real,\\n\"ROM_MiB\" real,\\n\"Slots\" text,\\n\"WiFi\" text,\\n\"Bluetooth\" text,\\nPRIMARY KEY (\"Model_name\")\\n)', 'screen_mode': 'CREATE TABLE \"screen_mode\" (\\n\"Graphics_mode\" real,\\n\"Char_cells\" text,\\n\"Pixels\" text,\\n\"Hardware_colours\" real,\\n\"used_kb\" real,\\n\"map\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"Graphics_mode\")\\n)', 'phone': 'CREATE TABLE \"phone\" (\\n\"Company_name\" text,\\n\"Hardware_Model_name\" text,\\n\"Accreditation_type\" text,\\n\"Accreditation_level\" text,\\n\"Date\" text,\\n\"chip_model\" text,\\n\"screen_mode\" text,\\nPRIMARY KEY(\"Hardware_Model_name\"),\\nFOREIGN KEY (`screen_mode`) REFERENCES `screen_mode`(`Graphics_mode`),\\nFOREIGN KEY (`chip_model`) REFERENCES `chip_model`(`Model_name`)\\n)'}\n\n## User-Prompt:\nقائمة اسم الشركة التي أنتجت أكثر من نموذج هاتف واحد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Company_name FROM phone GROUP BY Company_name HAVING count(*) > 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هي تواريخ الإرسال لجميع المستندات التي لديها مبلغ من المنح أكبر من 5000 وتشارك في البحث؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nما هو أقصى وأدنى طول لجميع اللاعبين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(weight) , min(weight) FROM Player\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر متوسط ​​مبلغ المعاملة لأنواع المعاملات المختلفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = \"PUR\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'aircraft': 'CREATE TABLE \"aircraft\" (\\n\"Aircraft_ID\" int,\\n\"Order_Year\" int,\\n\"Manufacturer\" text,\\n\"Model\" text,\\n\"Fleet_Series\" text,\\n\"Powertrain\" text,\\n\"Fuel_Propulsion\" text,\\nPRIMARY KEY (\"Aircraft_ID\")\\n)', 'pilot': 'CREATE TABLE \"pilot\" (\\n\"Pilot_ID\" int,\\n\"Pilot_name\" text,\\n\"Rank\" int,\\n\"Age\" int,\\n\"Nationality\" text,\\n\"Position\" text,\\n\"Join_Year\" int,\\n\"Team\" text,\\nPRIMARY KEY (\"Pilot_ID\")\\n)', 'pilot_record': 'CREATE TABLE \"pilot_record\" (\\n\"Record_ID\" int,\\n\"Pilot_ID\" int,\\n\"Aircraft_ID\" int,\\n\"Date\" text,\\nPRIMARY KEY (\"Pilot_ID\", \"Aircraft_ID\", \"Date\"),\\nFOREIGN KEY (`Pilot_ID`) REFERENCES `pilot`(`Pilot_ID`),\\nFOREIGN KEY (`Aircraft_ID`) REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nأظهر مناصب الطيارين الذين انضموا جميعهم بعد عام 2005 والذين انضموا جميعهم قبل عام 2000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT POSITION FROM pilot WHERE Join_Year\t < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year\t > 2005\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على السعة القصوى والمتوسطة بين الغرف في كل مبنى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(capacity) , avg(capacity) , building FROM classroom GROUP BY building\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي جميع التفاصيل حول الطلاب الذين قاموا بالتسجيل ولكن لم يحضروا أي دورة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول والاسم الأخير للعميل الذي يمتلك البريد الإلكتروني luisg@embraer.com.br؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT FirstName , LastName FROM CUSTOMER WHERE Email = \"luisg@embraer.com.br\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أسماء العملاء الذين قاموا بشراء ثلاثة منتجات مختلفة على الأقل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nأي عميل يحتوي اسمه على 'Alex'؟ اعثر على الاسم الكامل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT product_details FROM products\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي أسماء البنوك المختلفة التي قدمت قروض؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هي الحساسيات وأنواعها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT allergy , allergytype FROM Allergy_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nكم عدد السكنات التي تحتوي على وسائل راحة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT dormid) FROM has_amenity\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على الاسم والراتب للمدرسين الذين يشرفون على أي طالب من قسم التاريخ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nارجع بالعلم الذي يكون الأكثر شيوعًا بين جميع السفن.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي معرّف الوظيفة وتاريخ التوظيف لتلك الموظفين الذين تم توظيفهم بين الخامس من نوفمبر، 2007 والخامس من يوليو، 2009؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع المدن التي تحتوي على أكثر من مطار وكم عدد المطارات التي تمتلكها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*) > 3)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الاسم الكامل (الأول والأخير)، تار\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"City\" text,\\n\"Hanzi\" text,\\n\"Hanyu_Pinyin\" text,\\n\"Regional_Population\" int,\\n\"GDP\" real,\\nPRIMARY KEY (\"City_ID\")\\n)', 'match': 'CREATE TABLE \"match\" (\\n\"Match_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Score\" text,\\n\"Result\" text,\\n\"Competition\" text,\\nPRIMARY KEY (\"Match_ID\")\\n)', 'temperature': 'CREATE TABLE \"temperature\" (\\n\"City_ID\" int,\\n\"Jan\" real,\\n\"Feb\" real,\\n\"Mar\" real,\\n\"Apr\" real,\\n\"Jun\" real,\\n\"Jul\" real,\\n\"Aug\" real,\\n\"Sep\" real,\\n\"Oct\" real,\\n\"Nov\" real,\\n\"Dec\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)\\n)', 'hosting_city': 'CREATE TABLE \"hosting_city\" (\\n \"Year\" int,\\n \"Match_ID\" int,\\n \"Host_City\" text,\\n PRIMARY KEY (\"Year\"),\\n FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),\\n FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن موقع مسابقة 'تصفيات كأس العالم لكرة القدم 1994' التي استضافتها 'نانجينغ (جيانغسو)'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nما هو اسم نوع المستند للمستند بالاسم كيفية قراءة كتاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nكم عمر الطبيب الذي يدعى زاك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر جميع التواريخ للمعاملات التي يكون رمز نوعها SALE.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nما هي العناوين الشهيرة للفنانين الذين ليس لديهم فقط ألبومات استمرت لأكثر من 2 أسابيع في الصدارة ولكن أيضًا ألبومات استمرت لأقل من 2 أسابيع في الصدارة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'building': 'CREATE TABLE \"building\" (\\n\"building_id\" text,\\n\"Name\" text,\\n\"Street_address\" text,\\n\"Years_as_tallest\" text,\\n\"Height_feet\" int,\\n\"Floors\" int,\\nPRIMARY KEY(\"building_id\")\\n)', 'Institution': 'CREATE TABLE \"Institution\" (\\n\"Institution_id\" text,\\n\"Institution\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Type\" text,\\n\"Enrollment\" int,\\n\"Team\" text,\\n\"Primary_Conference\" text,\\n\"building_id\" text,\\nPRIMARY KEY(\"Institution_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"building\"(\"building_id\")\\n)', 'protein': 'CREATE TABLE \"protein\" (\\n\"common_name\" text,\\n\"protein_name\" text,\\n\"divergence_from_human_lineage\" real,\\n\"accession_number\" text,\\n\"sequence_length\" real,\\n\"sequence_identity_to_human_protein\" text,\\n\"Institution_id\" text,\\nPRIMARY KEY(\"common_name\"),\\nFOREIGN KEY(\"Institution_id\") REFERENCES \"Institution\"(\"Institution_id\")\\n)'}\n\n## User-Prompt:\nأظهر عدد المباني التي يزيد ارتفاعها عن المتوسط أو عدد الطوابق عن المتوسط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM building WHERE height_feet > (SELECT avg(height_feet) FROM building) OR floors > (SELECT avg(floors) FROM building)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هي الرموز والأسماء والوصف لأنواع الوثائق المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nقائمة بأسماء الشركات بترتيب تنازلي حسب القيمة السوقية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Companies\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع المقطوعات في الألبوم المسمى Balls to the Wall؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = \"Balls to the Wall\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nعدد السفن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM ship\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على اسم الدورات التي ليس لديها أي متطلب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Third_Party_Companies': 'CREATE TABLE `Third_Party_Companies` (\\n`company_id` INTEGER PRIMARY KEY ,\\n`company_type` VARCHAR(5) NOT NULL,\\n`company_name` VARCHAR(255),\\n`company_address` VARCHAR(255),\\n`other_company_details` VARCHAR(255)\\n)', 'Maintenance_Contracts': 'CREATE TABLE `Maintenance_Contracts` (\\n`maintenance_contract_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_company_id` INTEGER NOT NULL,\\n`contract_start_date` DATETIME,\\n`contract_end_date` DATETIME,\\n`other_contract_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Parts': 'CREATE TABLE `Parts` (\\n`part_id` INTEGER PRIMARY KEY,\\n`part_name` VARCHAR(255),\\n`chargeable_yn` VARCHAR(1),\\n`chargeable_amount` VARCHAR(20),\\n`other_part_details` VARCHAR(255)\\n)', 'Skills': 'CREATE TABLE `Skills` (\\n`skill_id` INTEGER PRIMARY KEY,\\n`skill_code` VARCHAR(20),\\n`skill_description` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_name` VARCHAR(255),\\n`gender` VARCHAR(1),\\n`other_staff_details` VARCHAR(255)\\n)', 'Assets': 'CREATE TABLE `Assets` (\\n`asset_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_id` INTEGER NOT NULL,\\n`supplier_company_id` INTEGER NOT NULL,\\n`asset_details` VARCHAR(255),\\n`asset_make` VARCHAR(20),\\n`asset_model` VARCHAR(20),\\n`asset_acquired_date` DATETIME,\\n`asset_disposed_date` DATETIME,\\n`other_asset_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_id` )\\nREFERENCES `Maintenance_Contracts`(`maintenance_contract_id` ),\\nFOREIGN KEY (`supplier_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Asset_Parts': 'CREATE TABLE `Asset_Parts` (\\n`asset_id` INTEGER NOT NULL,\\n`part_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` ),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` )\\n)', 'Maintenance_Engineers': 'CREATE TABLE `Maintenance_Engineers` (\\n`engineer_id` INTEGER PRIMARY KEY,\\n`company_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(50),\\n`last_name` VARCHAR(50),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Engineer_Skills': 'CREATE TABLE `Engineer_Skills` (\\n`engineer_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)', 'Fault_Log': 'CREATE TABLE `Fault_Log` (\\n`fault_log_entry_id` INTEGER PRIMARY KEY,\\n`asset_id` INTEGER NOT NULL,\\n`recorded_by_staff_id` INTEGER NOT NULL,\\n`fault_log_entry_datetime` DATETIME,\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` ),\\nFOREIGN KEY (`recorded_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Engineer_Visits': 'CREATE TABLE `Engineer_Visits` (\\n`engineer_visit_id` INTEGER PRIMARY KEY,\\n`contact_staff_id` INTEGER,\\n`engineer_id` INTEGER NOT NULL,\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\n`visit_start_datetime` DATETIME,\\n`visit_end_datetime` DATETIME,\\n`other_visit_details` VARCHAR(255),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` ),\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`contact_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Part_Faults': 'CREATE TABLE `Part_Faults` (\\n`part_fault_id` INTEGER PRIMARY KEY,\\n`part_id` INTEGER NOT NULL,\\n`fault_short_name` VARCHAR(20),\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` )\\n)', 'Fault_Log_Parts': 'CREATE TABLE `Fault_Log_Parts` (\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`part_fault_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` )\\n)', 'Skills_Required_To_Fix': 'CREATE TABLE `Skills_Required_To_Fix` (\\n`part_fault_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)'}\n\n## User-Prompt:\nأي الأجزاء التي تحتوي على أكثر من 2 عيوب؟ أظهر اسم الجزء ومعرّفه.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.engineer_id , T1.first_name , T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nأي الطلبات تمت بواسطة العميل بالاسم Jeramie؟ قدم لي معرف الطلب وحالتها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي معرّفات السائقين، الأسماء الأولى، وعدد السباقات لجميع السائقين الذين شاركوا في على الأقل سباقين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"id\" int,\\n\"name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nprimary key(\"id\")\\n)', 'camera_lens': 'CREATE TABLE \"camera_lens\" (\\n\"id\" int,\\n\"brand\" text,\\n\"name\" text,\\n\"focal_length_mm\" real,\\n\"max_aperture\" real,\\nprimary key(\"id\")\\n)', 'photos': 'CREATE TABLE \"photos\" (\\n\"id\" int, \\n\"camera_lens_id\" int,\\n\"mountain_id\" int,\\n\"color\" text, \\n\"name\" text,\\nprimary key(\"id\"),\\nforeign key(\"camera_lens_id\") references `camera_lens`(\"id\"),\\nforeign key(\"mountain_id\") references `mountain`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي المعرف والاسم للجبال التي تحتوي على ما لا يقل عن صورتين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو رمز اللون والوصف للمنتج بالاسم الشبت؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأي مستشار لديه أكبر عدد من الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هي أسماء وعناوين وظائف جميع الأشخاص مرتبة أبجديًا حسب الاسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , job FROM Person ORDER BY name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Address\" text,\\n\"Num_of_staff\" text,\\n\"Score\" real,\\n\"Open_Year\" text,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Membership_card\" text,\\n\"Age\" int,\\n\"Time_of_purchase\" int,\\n\"Level_of_membership\" int,\\n\"Address\" text,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'happy_hour': 'CREATE TABLE \"happy_hour\" (\\n\"HH_ID\" int,\\n\"Shop_ID\" int,\\n\"Month\" text,\\n\"Num_of_shaff_in_charge\" int,\\nPRIMARY KEY (\"HH_ID\",\"Shop_ID\",\"Month\"),\\nFOREIGN KEY (\"Shop_ID\") REFERENCES `shop`(\"Shop_ID\")\\n)', 'happy_hour_member': 'CREATE TABLE \"happy_hour_member\" (\\n\"HH_ID\" int,\\n\"Member_ID\" int,\\n\"Total_amount\" real,\\nPRIMARY KEY (\"HH_ID\",\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nأظهر عناوين المتاجر مرتبة حسب سنة افتتاحها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT address FROM shop ORDER BY open_year\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الأطباء الذين يحتوي عنوان وظيفتهم على كلمة 'senior'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن رتبة القبطان التي لا يوجد فيها أي قبطان في فئة السفينة من الخط الثالث.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nعدد الحجوزات الإجمالي التي تم إجراؤها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM BOOKINGS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو السعر الوحدوي المتوسط لجميع المسارات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT AVG(UnitPrice) FROM TRACK\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو رمز المدرسة لقسم المحاسبة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT school_code FROM department WHERE dept_name = \"Accounting\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأجناس للطلاب الذين يعانون من حساسية تجاه الحليب ولكن يمكنهم التحمل من القطط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT fname , sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Milk\" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = \"Cat\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nاسترجع قائمة جميع المدن.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنانين الذين هم من بنغلاديش ولم يتلقوا تقييمًا يزيد عن 7؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT artist_name FROM song WHERE languages = \"english\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nما هي مختلف أنواع النماذج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT form_type_code FROM forms\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هو اسم النبيذ الذي حصل على أعلى تقييم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM WINE ORDER BY Score LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nالبحث عن رمز طريقة الدفع المستخدمة من قبل أكثر من 3 أطراف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'phone': 'CREATE TABLE \"phone\" (\\n\"Name\" text,\\n\"Phone_ID\" int,\\n\"Memory_in_G\" int,\\n\"Carrier\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Phone_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"District\" text,\\n\"Num_of_employees\" int,\\n\"Num_of_shops\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'phone_market': 'CREATE TABLE \"phone_market\" (\\n\"Market_ID\" int,\\n\"Phone_ID\" text,\\n\"Num_of_stock\" int,\\nPRIMARY KEY (\"Market_ID\",\"Phone_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES `market`(\"Market_ID\"),\\nFOREIGN KEY (\"Phone_ID\") REFERENCES `phone`(\"Phone_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء الهواتف ومناطق الأسواق التي توجد بها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nابحث عن عدد الغرف الموجودة في كل طابق للكتلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nأين تعيش العميلة التي تحمل اسم Linda؟ وما هو بريدها الإلكتروني؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nأعد الحد الأقصى لعدد النقاط للمتسلقين من المملكة المتحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(Points) FROM climber WHERE Country = \"United Kingdom\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي الحرم الجامعية الموجودة في مقاطعة لوس أنجلوس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campus FROM campuses WHERE county = \"Los Angeles\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هو وصف منطقة التسويق الصين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT payment_method_code FROM INVOICES\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nأي ولاية لديها أكبر إجمالي عدد من عملاء البنك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هي وصف أنواع الخدمات بسعر المنتج أعلى من 100؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = \"Rob Dinning\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nما هي الحصة الإجمالية (بالنسبة المئوية) لجميع القنوات التي تمتلكها CCTV؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nأي جامعة في مقاطعة لوس أنجلوس وافتتحت بعد عام ١٩٥٠؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mission': 'CREATE TABLE \"mission\" (\\n\"Mission_ID\" int,\\n\"Ship_ID\" int,\\n\"Code\" text,\\n\"Launched_Year\" int,\\n\"Location\" text,\\n\"Speed_knots\" int,\\n\"Fate\" text,\\nPRIMARY KEY (\"Mission_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES `ship`(\"Ship_ID\")\\n)', 'ship': 'CREATE TABLE \"ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Nationality\" text,\\n\"Tonnage\" int,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nاذكر الدول التي لديها أكثر من سفينتين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هو اسم كل سكن يحتوي على صالة تلفزيون ولكن ليس لديها غرف دراسة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد الفنانين المميزين الذين يرتبطون بالأصوات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Song FROM volume ORDER BY Song\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام تعريفية الطلاب الذين سجلوا في الدورة 301؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT student_id FROM student_course_attendance WHERE course_id = 301\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nكم عدد الزبائن في نوع الزبون الذي يحتوي على أكبر عدد من الزبائن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nارتب كل ورشة عمل بترتيب أبجدي للموقع. أرجع التاريخ والموقع لكل ورشة عمل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Date , Venue FROM workshop ORDER BY Venue\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو المتوسط السعري لمسارات الروك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هو المبلغ الإجمالي للمنح الممنوحة من كل المؤسسات؟ كما قم بتقديم قائمة بمعرف المؤسسة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT role_code) FROM Project_Staff\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد أنواع الحساسيات المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT allergytype) FROM Allergy_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nأظهر رقم الرحلة والمدينة المنشأ والوجهة لجميع الرحلات مرتبة ترتيباً أبجدياً حسب مدن المغادرة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT flno , origin , destination FROM Flight ORDER BY origin\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nما هي أسماء النوادي التي يوجد لديها عضو على الأقل من المدينة التي يكون لديها رمز المدينة HOU؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"BAL\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nمن فضلك، أعرض عناوين البريد الإلكتروني للموظفين الذين ليس لديهم نسبة عمولة والذين يتقاضون رواتب في النطاق بين 7000 و 12000 ويعملون في القسم الذي رقمه 50.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nكم عدد المتبرعين الذين لديهم تبرع للمدرسة بالاسم غلين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = \"Glenn\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nفي أي بلد وولاية يعيش جانيسا ساواين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nكم عدد السفن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nكم من الجنيهات الإجمالية تم شراؤها في عام 2018 في جميع فروع لندن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nأي طلاب يشاركون في كل من ركوب الكانو والتجديف بالقوارب الصغيرة كأنشطتهم؟ قل لي معرفاتهم الطلابية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE \"station\" (\\n\"Station_ID\" int,\\n\"Name\" text,\\n\"Annual_entry_exit\" real,\\n\"Annual_interchanges\" real,\\n\"Total_Passengers\" real,\\n\"Location\" text,\\n\"Main_Services\" text,\\n\"Number_of_Platforms\" int,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Name\" text,\\n\"Time\" text,\\n\"Service\" text,\\nPRIMARY KEY (\"Train_ID\")\\n)', 'train_station': 'CREATE TABLE \"train_station\" (\\n\"Train_ID\" int,\\n\"Station_ID\" int,\\t\\nPRIMARY KEY (\"Train_ID\",\"Station_ID\"),\\nFOREIGN KEY (\"Train_ID\") REFERENCES \"train\"(\"Train_ID\"),\\nFOREIGN KEY (\"Station_ID\") REFERENCES \"station\"(\"Station_ID\")\\n)'}\n\n## User-Prompt:\nأظهر جميع المواقع التي تحتوي على محطة واحدة فقط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الحالات المختلفة وأعداد الأفعوانيات لكل حالة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Speed) FROM roller_coaster\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء المتسلقين والارتفاعات المتناغمة للجبال التي يتسلقونها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع الأقسام مرتبة حسب أسمائها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي الحرم الجامعية التي فتحت قبل عام ١٨٠٠؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT campus FROM campuses WHERE YEAR < 1800\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Enrollment\" real,\\n\"Founded\" real,\\n\"Denomination\" text,\\n\"Boys_or_Girls\" text,\\n\"Day_or_Boarding\" text,\\n\"Year_Entered_Competition\" real,\\n\"School_Colors\" text,\\nPRIMARY KEY (\"School_Id\")\\n)', 'school_details': 'CREATE TABLE \"school_details\" (\\n\"School_ID\" int,\\n\"Nickname\" text,\\n\"Colors\" text,\\n\"League\" text,\\n\"Class\" text,\\n\"Division\" text,\\nPRIMARY KEY (\"School_Id\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'school_performance': 'CREATE TABLE \"school_performance\" (\\n\"School_Id\" int,\\n\"School_Year\" text,\\n\"Class_A\" text,\\n\"Class_AA\" text,\\nPRIMARY KEY (\"School_Id\",\"School_Year\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Player\" text,\\n\"Team\" text,\\n\"Age\" int,\\n\"Position\" text,\\n\"School_ID\" int,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `school`(`School_ID`)\\n)'}\n\n## User-Prompt:\nأظهر المواقع والألقاب الخاصة بالمدارس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الملاعب التي سعتها أقل من السعة المتوسطة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM stadium ORDER BY capacity DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'book_club': 'CREATE TABLE \"book_club\" (\\n\"book_club_id\" int,\\n\"Year\" int,\\n\"Author_or_Editor\" text,\\n\"Book_Title\" text,\\n\"Publisher\" text,\\n\"Category\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"book_club_id\")\\n)', 'movie': 'CREATE TABLE \"movie\" (\\n\"movie_id\" int,\\n\"Title\" text,\\n\"Year\" int,\\n\"Director\" text,\\n\"Budget_million\" real,\\n\"Gross_worldwide\" int,\\nPRIMARY KEY(\"movie_id\")\\n)', 'culture_company': 'CREATE TABLE \"culture_company\" (\\n\"Company_name\" text,\\n\"Type\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\n\"book_club_id\" text,\\n\"movie_id\" text,\\nPRIMARY KEY(\"Company_name\"),\\nFOREIGN KEY (\"book_club_id\") REFERENCES \"book_club\"(\"book_club_id\"),\\nFOREIGN KEY (\"movie_id\") REFERENCES \"movie\"(\"movie_id\")\\n)'}\n\n## User-Prompt:\nما هم المخرجون الذين كان لديهم فيلم في إحدى سنتي 1999 أو 2000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nفي أي يوم تم تقديم الطلب الذي يحمل رقم تتبع الشحن 3452؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي أسماء العملاء المختلفين الذين قاموا بأخذ قرض، مرتبة حسب المبلغ الإجمالي الذي أخذوه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة ومعرّفات السائقين لجميع الذين قاموا بأكثر من 8 توقفات أو شاركوا في أكثر من 5 سباقات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 8 UNION SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء الأغاني التي هي معاصرة أو تُغنى باللغة الإنجليزية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما هي أسماء ومعرّفات معالم الجذب السياحي التي يتم زيارتها مرة واحدة على الأكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name , T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) <= 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nأعطني اسم العميل الذي قام بطلب أكبر عدد من العناصر بشكل إجمالي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = ( SELECT max(order_quantity) FROM order_items)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nما هو اسم المشروع الذي يتطلب أقل عدد من الساعات، وأسماء العلماء الذين تم تعيينهم فيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nأظهر رقم البطاقة، والاسم، والمدينة الأصلية لجميع الأعضاء بترتيب تنازلي حسب المستوى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT LEVEL) FROM member\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'railway': 'CREATE TABLE \"railway\" (\\n\"Railway_ID\" int,\\n\"Railway\" text,\\n\"Builder\" text,\\n\"Built\" text,\\n\"Wheels\" text,\\n\"Location\" text,\\n\"ObjectNumber\" text,\\nPRIMARY KEY (\"Railway_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Train_Num\" text,\\n\"Name\" text,\\n\"From\" text,\\n\"Arrival\" text,\\n\"Railway_ID\" int,\\nPRIMARY KEY (\"Train_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES `railway`(\"Railway_ID\")\\n)', 'manager': 'CREATE TABLE \"manager\" (\\n\"Manager_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Working_year_starts\" text,\\n\"Age\" int,\\n\"Level\" int,\\nPRIMARY KEY (\"Manager_ID\")\\n)', 'railway_manage': 'CREATE TABLE \"railway_manage\" (\\n\"Railway_ID\" int,\\n\"Manager_ID\" int,\\n\"From_Year\" text,\\nPRIMARY KEY (\"Railway_ID\",\"Manager_ID\"),\\nFOREIGN KEY (\"Manager_ID\") REFERENCES \"manager\"(\"Manager_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES \"railway\"(\"Railway_ID\")\\n)'}\n\n## User-Prompt:\nقائمة بعدد العجلات والمواقع للسكك الحديدية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Builder FROM railway ORDER BY Builder ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي معرّفات الموظفين لكل موظف وتواريخ انتهاء العمل النهائية في وظيفتهم الأخيرة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nStaff_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Staff_ID)\\n)', 'Policies': 'CREATE TABLE Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATETIME,\\nEnd_Date DATETIME,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claim_Headers': 'CREATE TABLE Claim_Headers (\\nClaim_Header_ID INTEGER NOT NULL,\\nClaim_Status_Code CHAR(15) NOT NULL,\\nClaim_Type_Code CHAR(15) NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_of_Claim DATETIME,\\nDate_of_Settlement DATETIME,\\nAmount_Claimed DECIMAL(20,4),\\nAmount_Piad DECIMAL(20,4),\\nPRIMARY KEY (Claim_Header_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Policies (Policy_ID)\\n)', 'Claims_Documents': 'CREATE TABLE Claims_Documents (\\nClaim_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nCreated_by_Staff_ID INTEGER,\\nCreated_Date INTEGER,\\nPRIMARY KEY (Claim_ID, Document_Type_Code),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Created_by_Staff_ID) REFERENCES Staff (Staff_ID)\\n)', 'Claims_Processing_Stages': 'CREATE TABLE Claims_Processing_Stages (\\nClaim_Stage_ID INTEGER NOT NULL,\\nNext_Claim_Stage_ID INTEGER,\\nClaim_Status_Name VARCHAR(255) NOT NULL,\\nClaim_Status_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Claim_Stage_ID)\\n)', 'Claims_Processing': 'CREATE TABLE Claims_Processing (\\nClaim_Processing_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nClaim_Outcome_Code CHAR(15) NOT NULL,\\nClaim_Stage_ID INTEGER NOT NULL,\\nStaff_ID INTEGER,\\nPRIMARY KEY (Claim_Processing_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claim_Headers (Claim_Header_ID),\\nFOREIGN KEY (Staff_ID) REFERENCES Staff (Staff_ID)\\n)'}\n\n## User-Prompt:\nالعثور على عدد المراحل المميزة في معالجة المطالبات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM claims_processing_stages\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي هويات الطلاب الذين عملوا لفترة تزيد عن 10 ساعات في الأسبوع في جميع الرياضات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nاعثر على عدد المدن المختلفة التي يعيش فيها الموظفون.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT(DISTINCT city) FROM EMPLOYEE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nابحث عن عدد الفصول في كل مدرسة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mission': 'CREATE TABLE \"mission\" (\\n\"Mission_ID\" int,\\n\"Ship_ID\" int,\\n\"Code\" text,\\n\"Launched_Year\" int,\\n\"Location\" text,\\n\"Speed_knots\" int,\\n\"Fate\" text,\\nPRIMARY KEY (\"Mission_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES `ship`(\"Ship_ID\")\\n)', 'ship': 'CREATE TABLE \"ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Nationality\" text,\\n\"Tonnage\" int,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء السفن التي ليست من الولايات المتحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM ship WHERE Nationality != \"United States\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'chip_model': 'CREATE TABLE \"chip_model\" (\\n\"Model_name\" text,\\n\"Launch_year\" real,\\n\"RAM_MiB\" real,\\n\"ROM_MiB\" real,\\n\"Slots\" text,\\n\"WiFi\" text,\\n\"Bluetooth\" text,\\nPRIMARY KEY (\"Model_name\")\\n)', 'screen_mode': 'CREATE TABLE \"screen_mode\" (\\n\"Graphics_mode\" real,\\n\"Char_cells\" text,\\n\"Pixels\" text,\\n\"Hardware_colours\" real,\\n\"used_kb\" real,\\n\"map\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"Graphics_mode\")\\n)', 'phone': 'CREATE TABLE \"phone\" (\\n\"Company_name\" text,\\n\"Hardware_Model_name\" text,\\n\"Accreditation_type\" text,\\n\"Accreditation_level\" text,\\n\"Date\" text,\\n\"chip_model\" text,\\n\"screen_mode\" text,\\nPRIMARY KEY(\"Hardware_Model_name\"),\\nFOREIGN KEY (`screen_mode`) REFERENCES `screen_mode`(`Graphics_mode`),\\nFOREIGN KEY (`chip_model`) REFERENCES `chip_model`(`Model_name`)\\n)'}\n\n## User-Prompt:\nما هو أقصى وأدنى حجم لذاكرة الوصول العشوائي للهواتف التي تنتجها الشركة المسماة شركة نوكيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(T1.RAM_MiB) , min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = \"Nokia Corporation\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Address_Types': 'CREATE TABLE `Ref_Address_Types` (\\n`address_type_code` VARCHAR(15) PRIMARY KEY,\\n`address_type_description` VARCHAR(80)\\n)', 'Ref_Detention_Type': 'CREATE TABLE `Ref_Detention_Type` (\\n`detention_type_code` VARCHAR(10) PRIMARY KEY,\\n`detention_type_description` VARCHAR(80)\\n)', 'Ref_Incident_Type': 'CREATE TABLE `Ref_Incident_Type` (\\n`incident_type_code` VARCHAR(10) PRIMARY KEY,\\n`incident_type_description` VARCHAR(80)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1` VARCHAR(120),\\n`line_2` VARCHAR(120),\\n`line_3` VARCHAR(120),\\n`city` VARCHAR(80),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(40),\\n`last_name` VARCHAR(40),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`date_first_rental` DATETIME,\\n`date_left_university` DATETIME,\\n`other_student_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Teachers': 'CREATE TABLE `Teachers` (\\n`teacher_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender` VARCHAR(1),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Assessment_Notes': 'CREATE TABLE `Assessment_Notes` (\\n`notes_id` INTEGER NOT NULL ,\\n`student_id` INTEGER,\\n`teacher_id` INTEGER NOT NULL,\\n`date_of_notes` DATETIME,\\n`text_of_notes` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Behavior_Incident': 'CREATE TABLE `Behavior_Incident` (\\n`incident_id` INTEGER PRIMARY KEY,\\n`incident_type_code` VARCHAR(10) NOT NULL,\\n`student_id` INTEGER NOT NULL,\\n`date_incident_start` DATETIME,\\n`date_incident_end` DATETIME,\\n`incident_summary` VARCHAR(255),\\n`recommendations` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Detention': 'CREATE TABLE `Detention` (\\n`detention_id` INTEGER PRIMARY KEY,\\n`detention_type_code` VARCHAR(10) NOT NULL,\\n`teacher_id` INTEGER,\\n`datetime_detention_start` DATETIME,\\n`datetime_detention_end` DATETIME,\\n`detention_summary` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Student_Addresses': 'CREATE TABLE `Student_Addresses` (\\n`student_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`date_address_to` DATETIME,\\n`monthly_rental` DECIMAL(19,4),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Students_in_Detention': 'CREATE TABLE `Students_in_Detention` (\\n`student_id` INTEGER NOT NULL,\\n`detention_id` INTEGER NOT NULL,\\n`incident_id` INTEGER NOT NULL,\\nFOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),\\nFOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)'}\n\n## User-Prompt:\nما هي النصوص لملاحظات التقييم للمعلمين الذين يحملون اسم العائلة شوستر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = \"Fanny\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nإرجاع مضيفي المسابقات التي ليست موضوعها الكائنات الفضائية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء جميع المتبرعين باستثناء تلك التي قيمة تبرعها أقل من 9.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد المستشارين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT advisor) FROM Student\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nما هو البلد الذي نُشرت فيه أكبر عدد من الأوراق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هي معرفة واسم الطائرة التي يمكنها قطع المسافة القصوى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Third_Party_Companies': 'CREATE TABLE `Third_Party_Companies` (\\n`company_id` INTEGER PRIMARY KEY ,\\n`company_type` VARCHAR(5) NOT NULL,\\n`company_name` VARCHAR(255),\\n`company_address` VARCHAR(255),\\n`other_company_details` VARCHAR(255)\\n)', 'Maintenance_Contracts': 'CREATE TABLE `Maintenance_Contracts` (\\n`maintenance_contract_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_company_id` INTEGER NOT NULL,\\n`contract_start_date` DATETIME,\\n`contract_end_date` DATETIME,\\n`other_contract_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Parts': 'CREATE TABLE `Parts` (\\n`part_id` INTEGER PRIMARY KEY,\\n`part_name` VARCHAR(255),\\n`chargeable_yn` VARCHAR(1),\\n`chargeable_amount` VARCHAR(20),\\n`other_part_details` VARCHAR(255)\\n)', 'Skills': 'CREATE TABLE `Skills` (\\n`skill_id` INTEGER PRIMARY KEY,\\n`skill_code` VARCHAR(20),\\n`skill_description` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_name` VARCHAR(255),\\n`gender` VARCHAR(1),\\n`other_staff_details` VARCHAR(255)\\n)', 'Assets': 'CREATE TABLE `Assets` (\\n`asset_id` INTEGER PRIMARY KEY,\\n`maintenance_contract_id` INTEGER NOT NULL,\\n`supplier_company_id` INTEGER NOT NULL,\\n`asset_details` VARCHAR(255),\\n`asset_make` VARCHAR(20),\\n`asset_model` VARCHAR(20),\\n`asset_acquired_date` DATETIME,\\n`asset_disposed_date` DATETIME,\\n`other_asset_details` VARCHAR(255),\\nFOREIGN KEY (`maintenance_contract_id` )\\nREFERENCES `Maintenance_Contracts`(`maintenance_contract_id` ),\\nFOREIGN KEY (`supplier_company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Asset_Parts': 'CREATE TABLE `Asset_Parts` (\\n`asset_id` INTEGER NOT NULL,\\n`part_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` ),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` )\\n)', 'Maintenance_Engineers': 'CREATE TABLE `Maintenance_Engineers` (\\n`engineer_id` INTEGER PRIMARY KEY,\\n`company_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(50),\\n`last_name` VARCHAR(50),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`company_id` ) REFERENCES `Third_Party_Companies`(`company_id` )\\n)', 'Engineer_Skills': 'CREATE TABLE `Engineer_Skills` (\\n`engineer_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)', 'Fault_Log': 'CREATE TABLE `Fault_Log` (\\n`fault_log_entry_id` INTEGER PRIMARY KEY,\\n`asset_id` INTEGER NOT NULL,\\n`recorded_by_staff_id` INTEGER NOT NULL,\\n`fault_log_entry_datetime` DATETIME,\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`asset_id` ) REFERENCES `Assets`(`asset_id` ),\\nFOREIGN KEY (`recorded_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Engineer_Visits': 'CREATE TABLE `Engineer_Visits` (\\n`engineer_visit_id` INTEGER PRIMARY KEY,\\n`contact_staff_id` INTEGER,\\n`engineer_id` INTEGER NOT NULL,\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\n`visit_start_datetime` DATETIME,\\n`visit_end_datetime` DATETIME,\\n`other_visit_details` VARCHAR(255),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` ),\\nFOREIGN KEY (`engineer_id` ) REFERENCES `Maintenance_Engineers`(`engineer_id` ),\\nFOREIGN KEY (`contact_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)', 'Part_Faults': 'CREATE TABLE `Part_Faults` (\\n`part_fault_id` INTEGER PRIMARY KEY,\\n`part_id` INTEGER NOT NULL,\\n`fault_short_name` VARCHAR(20),\\n`fault_description` VARCHAR(255),\\n`other_fault_details` VARCHAR(255),\\nFOREIGN KEY (`part_id` ) REFERENCES `Parts`(`part_id` )\\n)', 'Fault_Log_Parts': 'CREATE TABLE `Fault_Log_Parts` (\\n`fault_log_entry_id` INTEGER NOT NULL,\\n`part_fault_id` INTEGER NOT NULL,\\n`fault_status` VARCHAR(10) NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`fault_log_entry_id` ) REFERENCES `Fault_Log`(`fault_log_entry_id` )\\n)', 'Skills_Required_To_Fix': 'CREATE TABLE `Skills_Required_To_Fix` (\\n`part_fault_id` INTEGER NOT NULL,\\n`skill_id` INTEGER NOT NULL,\\nFOREIGN KEY (`part_fault_id` ) REFERENCES `Part_Faults`(`part_fault_id` ),\\nFOREIGN KEY (`skill_id` ) REFERENCES `Skills`(`skill_id` )\\n)'}\n\n## User-Prompt:\nما هي جميع النماذج المميزة للأصول؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.skill_id , T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو معرف كل موظف لديه راتب على الأقل 100000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT eid FROM Employee WHERE salary > 100000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nاذكر أسماء جميع الممرضات المتميزات مرتبة ترتيباً تسلسلياً حسب الترتيب الأبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين لديهم قروض لكل من الرهون العقارية والسيارات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هي أسماء جميع المحطات التي تحتوي على أكثر من 10 دراجة متاحة وليست موجودة في سان خوسيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = \"San Jose\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nأظهر مستوى العضوية الذي يحتوي على أكبر عدد من الأعضاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT card_number , name , hometown FROM member ORDER BY LEVEL DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي أسماء المدرسين الذين لم يدروسوا دورات في الربيع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الاسم والموقع لجميع المضامير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , LOCATION FROM track\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هو اسم المراجع، عنوان الفيلم، تقييم الفيلم، وتاريخ التقييم لكل فيلم، مرتبة حسب اسم المراجع، عنوان الفيلم، ثم أخيرًا التقييم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nأي المستشارين لديهم أكثر من طالبين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"id\" int,\\n\"name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nprimary key(\"id\")\\n)', 'camera_lens': 'CREATE TABLE \"camera_lens\" (\\n\"id\" int,\\n\"brand\" text,\\n\"name\" text,\\n\"focal_length_mm\" real,\\n\"max_aperture\" real,\\nprimary key(\"id\")\\n)', 'photos': 'CREATE TABLE \"photos\" (\\n\"id\" int, \\n\"camera_lens_id\" int,\\n\"mountain_id\" int,\\n\"color\" text, \\n\"name\" text,\\nprimary key(\"id\"),\\nforeign key(\"camera_lens_id\") references `camera_lens`(\"id\"),\\nforeign key(\"mountain_id\") references `mountain`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أقصى ارتفاع وارتفاع متوسط للجبال؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT id , color , name FROM photos\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هي أنواع الحساسيات وكم عدد الحساسيات المتوافقة مع كل نوع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي أسماء العائلة والأسماء الأولى لجميع السائقين المميزين الذين كان لديهم وقت لفة أقل من 93000 ميللي ثانية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء المتاجر بترتيب تصاعدي حسب سنة الافتتاح؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Carrier FROM device WHERE Software_Platform != 'Android'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nما هي البرامج التي لا يتم بثها أبدًا في فترة الصباح؟ أعطني أسماء البرامج.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nما هي أسماء أي علماء عملوا على مشاريع يحملون الأسماء Matter of Time و A Puzzling Pattern؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'driver': 'CREATE TABLE \"driver\" (\\n\"Driver_ID\" int,\\n\"Name\" text,\\n\"Party\" text,\\n\"Home_city\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"Driver_ID\")\\n)', 'school': 'CREATE TABLE \"school\" (\\n\"School_ID\" int,\\n\"Grade\" text,\\n\"School\" text,\\n\"Location\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"School_ID\")\\n)', 'school_bus': 'CREATE TABLE \"school_bus\" (\\n\"School_ID\" int,\\n\"Driver_ID\" int,\\n\"Years_Working\" int,\\n\"If_full_time\" bool,\\nPRIMARY KEY (\"School_ID\",\"Driver_ID\"),\\nFOREIGN KEY (\"School_ID\") REFERENCES `school`(\"School_ID\"),\\nFOREIGN KEY (\"Driver_ID\") REFERENCES `driver`(\"Driver_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الحزب وعدد السائقين في كل حزب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , home_city , age FROM driver\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nكم عدد المدن المختلفة التي يوجد فيها البنوك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT state , acc_type , credit_score FROM customer WHERE no_of_loans = 0\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nما هي الشركات الناقلة المختلفة للأجهزة، مرتبة بالترتيب الأبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Carrier FROM device ORDER BY Carrier ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو وصف اللون لمعظم المنتجات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = \"white\" AND t2.unit_of_measure != \"Handful\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء جميع الشركات المصنعة ومقراتها، مرتبة حسب ترتيب الإيرادات الأعلى أولاً.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT headquarter FROM manufacturers WHERE founder = 'James'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nأي معالم جذب سياحي متعلقة بالعائلة المالكة؟ أخبرني عن تفاصيلها وكيفية الوصول إليها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Royal_Family_Details , T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء الأعضاء الذين لم يتم التسجيل لديهم في أي فرع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nكم عدد الدروس التي أكملها العميل ريان جودوين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'aircraft': 'CREATE TABLE \"aircraft\" (\\n\"Aircraft_ID\" int,\\n\"Order_Year\" int,\\n\"Manufacturer\" text,\\n\"Model\" text,\\n\"Fleet_Series\" text,\\n\"Powertrain\" text,\\n\"Fuel_Propulsion\" text,\\nPRIMARY KEY (\"Aircraft_ID\")\\n)', 'pilot': 'CREATE TABLE \"pilot\" (\\n\"Pilot_ID\" int,\\n\"Pilot_name\" text,\\n\"Rank\" int,\\n\"Age\" int,\\n\"Nationality\" text,\\n\"Position\" text,\\n\"Join_Year\" int,\\n\"Team\" text,\\nPRIMARY KEY (\"Pilot_ID\")\\n)', 'pilot_record': 'CREATE TABLE \"pilot_record\" (\\n\"Record_ID\" int,\\n\"Pilot_ID\" int,\\n\"Aircraft_ID\" int,\\n\"Date\" text,\\nPRIMARY KEY (\"Pilot_ID\", \"Aircraft_ID\", \"Date\"),\\nFOREIGN KEY (`Pilot_ID`) REFERENCES `pilot`(`Pilot_ID`),\\nFOREIGN KEY (`Aircraft_ID`) REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الطيارين بترتيب تصاعدي حسب الرتبة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Pilot_name FROM pilot ORDER BY Rank ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nكم عدد البلدان بشكل إجمالي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM country\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين لديهم قرض بمبلغ أكثر من 3000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.cust_name , T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nما هي تاريخ الإصدار للمجلد الذي كان على رأس القوائم لأقل عدد من الأسابيع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Date_of_ceremony FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nابحث عن عناوين البريد الإلكتروني للمستخدم الذي يحمل اسم ماري.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT email FROM user_profiles WHERE name = 'Mary'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولية وأسماء العائلة لجميع السائقين المميزين الذين كان لديهم وقت لفة أقل من 93000 ميللي ثانية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nأي النوادي التي يمتلك أحد أعضائها من المدينة التي يكون لها الرمز HOU؟ أعطني أسماء النوادي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"HOU\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء المدن في المقاطعة التي تحتوي على أكبر عدد من ضباط الشرطة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.White , T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Web_client_accelerator': 'CREATE TABLE \"Web_client_accelerator\" (\\n\"id\" int,\\n\"name\" text,\\n\"Operating_system\" text,\\n\"Client\" text,\\n\"Connection\" text,\\nprimary key(\"id\")\\n)', 'browser': 'CREATE TABLE \"browser\" (\\n\"id\" int,\\n\"name\" text,\\n\"market_share\" real,\\nprimary key(\"id\")\\n)', 'accelerator_compatible_browser': 'CREATE TABLE \"accelerator_compatible_browser\" (\\n\"accelerator_id\" int,\\n\"browser_id\" int,\\n\"compatible_since_year\" int,\\nprimary key(\"accelerator_id\", \"browser_id\"),\\nforeign key (\"accelerator_id\") references `Web_client_accelerator`(\"id\"),\\nforeign key (\"browser_id\") references `browser`(\"id\")\\n)'}\n\n## User-Prompt:\nمتى أصبحت التسريع 'CACHEbox' والمتصفح 'Internet Explorer' متوافقة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nما هي أسماء الإدخالات للفهرس الذي يحتوي على السمة المملوكة بواسطة معظم الإدخالات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'airport': 'CREATE TABLE \"airport\" (\\n\"id\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"IATA\" text,\\n\"ICAO\" text,\\n\"name\" text,\\nprimary key(\"id\")\\n)', 'operate_company': 'CREATE TABLE \"operate_company\" (\\n\"id\" int,\\n\"name\" text,\\n\"Type\" text,\\n\"Principal_activities\" text,\\n\"Incorporated_in\" text,\\n\"Group_Equity_Shareholding\" real,\\nprimary key (\"id\")\\n)', 'flight': 'CREATE TABLE \"flight\" (\\n\"id\" int,\\n\"Vehicle_Flight_number\" text,\\n\"Date\" text,\\n\"Pilot\" text,\\n\"Velocity\" real,\\n\"Altitude\" real,\\n\"airport_id\" int,\\n\"company_id\" int,\\nprimary key (\"id\"),\\nforeign key (\"airport_id\") references `airport`(\"id\"),\\nforeign key (\"company_id\") references `operate_company`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أسماء وأنواع الشركات التي قامت بتشغيل رحلة في أي وقت؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(velocity) FROM flight WHERE pilot = 'Thompson'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nأرجع أسماء جميع المناطق باستثناء الدنمارك.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT region_name FROM region WHERE region_name != 'Denmark'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأظهر هويات العملاء الذين ليس لديهم حساب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nما هو تاريخ الإصدار للمجلد الذي قضى أقل عدد من الأسابيع على رأس القوائم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'publication': 'CREATE TABLE \"publication\" (\\n\"Publication_ID\" int,\\n\"Book_ID\" int,\\n\"Publisher\" text,\\n\"Publication_Date\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Publication_ID\"),\\nFOREIGN KEY (\"Book_ID\") REFERENCES \"book\"(\"Book_ID\")\\n)', 'book': 'CREATE TABLE \"book\" (\\n\"Book_ID\" int,\\n\"Title\" text,\\n\"Issues\" real,\\n\"Writer\" text,\\nPRIMARY KEY (\"Book_ID\")\\n)'}\n\n## User-Prompt:\nأظهر عنوان وتواريخ النشر للكتب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'roller_coaster': 'CREATE TABLE \"roller_coaster\" (\\n\"Roller_Coaster_ID\" int,\\n\"Name\" text,\\n\"Park\" text,\\n\"Country_ID\" int,\\n\"Length\" real,\\n\"Height\" real,\\n\"Speed\" text,\\n\"Opened\" text,\\n\"Status\" text,\\nPRIMARY KEY (\"Roller_Coaster_ID\"),\\nFOREIGN KEY (\"Country_ID\") REFERENCES `country`(\"Country_ID\")\\n)', 'country': 'CREATE TABLE \"country\" (\\n\"Country_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Area\" int,\\n\"Languages\" text,\\nPRIMARY KEY (\"Country_ID\")\\n)'}\n\n## User-Prompt:\nما هي السرعة المتوسطة للأفعوانيات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنيين الذين يبلغون من العمر 36 أو 37 عامًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM technician WHERE Age = 36 OR Age = 37\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هي الهويات للمعاملات التي تحتوي على مبلغ أكبر من المتوسط لمبلغ المعاملة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nأي الأطباء ينتمون إلى إما قسم الجراحة أو علم النفس؟ أعطني أسمائهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي التقييم والدقة المتوسطة للأغاني التي تكون باللغة البنغالية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nابحث عن جميع الطلاب الذين يدرسهم MARROTTE KIRK. أظهر الاسم الأول والاسم الأخير للطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هو العنوان وقيمة الرصيد واسم القسم للدورات التي لها أكثر من متطلب واحد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.title , T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'product': 'CREATE TABLE \"product\" (\\n\"product_id\" int,\\n\"product\" text,\\n\"dimensions\" text,\\n\"dpi\" real,\\n\"pages_per_minute_color\" real,\\n\"max_page_size\" text,\\n\"interface\" text,\\nPRIMARY KEY (\"product_id\")\\n)', 'store': 'CREATE TABLE \"store\" (\\n\"Store_ID\" int,\\n\"Store_Name\" text,\\n\"Type\" text,\\n\"Area_size\" real,\\n\"Number_of_product_category\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Store_ID\")\\n)', 'district': 'CREATE TABLE \"district\" (\\n\"District_ID\" int,\\n\"District_name\" text,\\n\"Headquartered_City\" text,\\n\"City_Population\" real,\\n\"City_Area\" real,\\nPRIMARY KEY (\"District_ID\")\\n)', 'store_product': 'CREATE TABLE \"store_product\" (\\n\"Store_ID\" int,\\n\"Product_ID\" int,\\nPRIMARY KEY (\"Store_ID\",\"Product_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`Product_ID`) REFERENCES `product`(`Product_ID`)\\n)', 'store_district': 'CREATE TABLE \"store_district\" (\\n\"Store_ID\" int,\\n\"District_ID\" int,\\nPRIMARY KEY (\"Store_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`District_ID`) REFERENCES `district`(`District_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن قائمة أحجام الصفحات التي يتم سرد أكثر من 3 منتجات لها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT District_name FROM district ORDER BY city_area DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر رموز المرافق للشقق التي تحتوي على أكثر من 4 غرف نوم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أنواع وبلدان المسابقات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Gold) FROM club_rank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Is_Male\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'church': 'CREATE TABLE \"church\" (\\n\"Church_ID\" int,\\n\"Name\" text,\\n\"Organized_by\" text,\\n\"Open_Date\" int,\\n\"Continuation_of\" text,\\nPRIMARY KEY (\"Church_ID\")\\n)', 'wedding': 'CREATE TABLE \"wedding\" (\\n\"Church_ID\" int,\\n\"Male_ID\" int,\\n\"Female_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Church_ID\",\"Male_ID\",\"Female_ID\"),\\nFOREIGN KEY (\"Church_ID\") REFERENCES `church`(\"Church_ID\"),\\nFOREIGN KEY (\"Male_ID\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Female_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nاعرض الاسم والعمر لجميع الأشخاص الذكور الذين ليس لديهم حفل زفاف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , age FROM people WHERE is_male = 'T' AND people_id NOT IN (SELECT male_id FROM wedding)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'phone': 'CREATE TABLE \"phone\" (\\n\"Name\" text,\\n\"Phone_ID\" int,\\n\"Memory_in_G\" int,\\n\"Carrier\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Phone_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"District\" text,\\n\"Num_of_employees\" int,\\n\"Num_of_shops\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'phone_market': 'CREATE TABLE \"phone_market\" (\\n\"Market_ID\" int,\\n\"Phone_ID\" text,\\n\"Num_of_stock\" int,\\nPRIMARY KEY (\"Market_ID\",\"Phone_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES `market`(\"Market_ID\"),\\nFOREIGN KEY (\"Phone_ID\") REFERENCES `phone`(\"Phone_ID\")\\n)'}\n\n## User-Prompt:\nقائمة أسماء الهواتف التي ليست في أي سوق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nابحث عن اسم تسجيل الدخول المشترك بين مؤلفي المقررات والطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'phone': 'CREATE TABLE \"phone\" (\\n\"Name\" text,\\n\"Phone_ID\" int,\\n\"Memory_in_G\" int,\\n\"Carrier\" text,\\n\"Price\" real,\\nPRIMARY KEY (\"Phone_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"District\" text,\\n\"Num_of_employees\" int,\\n\"Num_of_shops\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'phone_market': 'CREATE TABLE \"phone_market\" (\\n\"Market_ID\" int,\\n\"Phone_ID\" text,\\n\"Num_of_stock\" int,\\nPRIMARY KEY (\"Market_ID\",\"Phone_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES `market`(\"Market_ID\"),\\nFOREIGN KEY (\"Phone_ID\") REFERENCES `phone`(\"Phone_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد الهواتف الموجودة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM phone\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي المواقع المختلفة للمدرسة التي لديها الرمز BUS؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي عناوين الأفلام والتقييم المتوسط للأفلام ذات أدنى تقييم متوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Discount_Coupons': 'CREATE TABLE `Discount_Coupons` (\\n`coupon_id` INTEGER PRIMARY KEY,\\n`date_issued` DATETIME,\\n`coupon_amount` DECIMAL(19,4)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`coupon_id` INTEGER NOT NULL,\\n`good_or_bad_customer` VARCHAR(4),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`date_became_customer` DATETIME,\\n`date_last_hire` DATETIME,\\nFOREIGN KEY (`coupon_id` ) REFERENCES `Discount_Coupons`(`coupon_id` )\\n)', 'Bookings': 'CREATE TABLE `Bookings` (\\n`booking_id` INTEGER PRIMARY KEY ,\\n`customer_id` INTEGER NOT NULL,\\n`booking_status_code` VARCHAR(10) NOT NULL,\\n`returned_damaged_yn` VARCHAR(40),\\n`booking_start_date` DATETIME,\\n`booking_end_date` DATETIME,\\n`count_hired` VARCHAR(40),\\n`amount_payable` DECIMAL(19,4),\\n`amount_of_discount` DECIMAL(19,4),\\n`amount_outstanding` DECIMAL(19,4),\\n`amount_of_refund` DECIMAL(19,4),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products_for_Hire': 'CREATE TABLE `Products_for_Hire` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(15) NOT NULL,\\n`daily_hire_cost` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255)\\n)', 'Payments': 'CREATE TABLE `Payments` (\\n`payment_id` INTEGER PRIMARY KEY,\\n`booking_id` INTEGER,\\n`customer_id` INTEGER NOT NULL,\\n`payment_type_code` VARCHAR(15) NOT NULL,\\n`amount_paid_in_full_yn` VARCHAR(1),\\n`payment_date` DATETIME,\\n`amount_due` DECIMAL(19,4),\\n`amount_paid` DECIMAL(19,4),\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products_Booked': 'CREATE TABLE `Products_Booked` (\\n`booking_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`returned_yn` VARCHAR(1),\\n`returned_late_yn` VARCHAR(1),\\n`booked_count` INTEGER,\\n`booked_amount` FLOAT NULL,\\nPRIMARY KEY (`booking_id`, `product_id`)\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )\\n)', 'View_Product_Availability': 'CREATE TABLE `View_Product_Availability` (\\n`product_id` INTEGER NOT NULL,\\n`booking_id` INTEGER NOT NULL,\\n`status_date` DATETIME PRIMARY KEY,\\n`available_yn` VARCHAR(1),\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء المنتجات التي تساوي توافرها 1؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'musical': 'CREATE TABLE \"musical\" (\\n\"Musical_ID\" int,\\n\"Name\" text,\\n\"Year\" int,\\n\"Award\" text,\\n\"Category\" text,\\n\"Nominee\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"Musical_ID\")\\n)', 'actor': 'CREATE TABLE \"actor\" (\\n\"Actor_ID\" int,\\n\"Name\" text,\\n\"Musical_ID\" int,\\n\"Character\" text,\\n\"Duration\" text,\\n\"age\" int,\\nPRIMARY KEY (\"Actor_ID\"),\\nFOREIGN KEY (\"Musical_ID\") REFERENCES \"actor\"(\"Actor_ID\")\\n)'}\n\n## User-Prompt:\nإرجاع النتيجة الأكثر تكرارًا عبر جميع المسرحيات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nما هي أسماء وسائل الراحة المختلفة في السكنات مرتبة بترتيب أبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT amenity_name FROM dorm_amenity ORDER BY amenity_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء المناطق التي تأثرت بها العواصف التي كان عدد الوفيات فيها على الأقل 10؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والأخيرة للفنان الذي كان في موقع الخلفية للأغنية بادلاندز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\" AND T1.StagePosition = \"back\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nكم عدد رموز أنواع الشكاوى المميزة في قاعدة البيانات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nما هي الأغنية في الحجم الذي يحتل أعلى مرتبة لأطول فترة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nاحسب عدد رموز أنواع الشكاوى المختلفة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT complaint_type_code) FROM complaints\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي أسعار النبيذ الذي تم إنتاجه قبل عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Area , County FROM APPELLATIONS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر العدد الإجمالي للغرف في جميع الشقق التي تحتوي على رمز المرفق النادي الرياضي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = \"Gym\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Address_Types': 'CREATE TABLE `Ref_Address_Types` (\\n`address_type_code` VARCHAR(15) PRIMARY KEY,\\n`address_type_description` VARCHAR(80)\\n)', 'Ref_Detention_Type': 'CREATE TABLE `Ref_Detention_Type` (\\n`detention_type_code` VARCHAR(10) PRIMARY KEY,\\n`detention_type_description` VARCHAR(80)\\n)', 'Ref_Incident_Type': 'CREATE TABLE `Ref_Incident_Type` (\\n`incident_type_code` VARCHAR(10) PRIMARY KEY,\\n`incident_type_description` VARCHAR(80)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1` VARCHAR(120),\\n`line_2` VARCHAR(120),\\n`line_3` VARCHAR(120),\\n`city` VARCHAR(80),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(40),\\n`last_name` VARCHAR(40),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`date_first_rental` DATETIME,\\n`date_left_university` DATETIME,\\n`other_student_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Teachers': 'CREATE TABLE `Teachers` (\\n`teacher_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender` VARCHAR(1),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Assessment_Notes': 'CREATE TABLE `Assessment_Notes` (\\n`notes_id` INTEGER NOT NULL ,\\n`student_id` INTEGER,\\n`teacher_id` INTEGER NOT NULL,\\n`date_of_notes` DATETIME,\\n`text_of_notes` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Behavior_Incident': 'CREATE TABLE `Behavior_Incident` (\\n`incident_id` INTEGER PRIMARY KEY,\\n`incident_type_code` VARCHAR(10) NOT NULL,\\n`student_id` INTEGER NOT NULL,\\n`date_incident_start` DATETIME,\\n`date_incident_end` DATETIME,\\n`incident_summary` VARCHAR(255),\\n`recommendations` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Detention': 'CREATE TABLE `Detention` (\\n`detention_id` INTEGER PRIMARY KEY,\\n`detention_type_code` VARCHAR(10) NOT NULL,\\n`teacher_id` INTEGER,\\n`datetime_detention_start` DATETIME,\\n`datetime_detention_end` DATETIME,\\n`detention_summary` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Student_Addresses': 'CREATE TABLE `Student_Addresses` (\\n`student_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`date_address_to` DATETIME,\\n`monthly_rental` DECIMAL(19,4),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Students_in_Detention': 'CREATE TABLE `Students_in_Detention` (\\n`student_id` INTEGER NOT NULL,\\n`detention_id` INTEGER NOT NULL,\\n`incident_id` INTEGER NOT NULL,\\nFOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),\\nFOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)'}\n\n## User-Prompt:\nما هي معرّفات وأسماء الأولى للمعلمين الثلاثة الذين لديهم أكبر عدد من ملاحظات التقييم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.student_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nقائمة أسماء المباني التي لا تحتوي على مكتب للشركات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Problem_Category_Codes': 'CREATE TABLE `Problem_Category_Codes` (\\n`problem_category_code` VARCHAR(20) PRIMARY KEY,\\n`problem_category_description` VARCHAR(80)\\n)', 'Problem_Log': 'CREATE TABLE `Problem_Log` (\\n`problem_log_id` INTEGER PRIMARY KEY,\\n`assigned_to_staff_id` INTEGER NOT NULL,\\n`problem_id` INTEGER NOT NULL,\\n`problem_category_code` VARCHAR(20) NOT NULL,\\n`problem_status_code` VARCHAR(20) NOT NULL,\\n`log_entry_date` DATETIME,\\n`log_entry_description` VARCHAR(255),\\n`log_entry_fix` VARCHAR(255),\\n`other_log_details` VARCHAR(255),\\nFOREIGN KEY (`problem_category_code` ) REFERENCES `Problem_Category_Codes`(`problem_category_code` ),FOREIGN KEY (`assigned_to_staff_id` ) REFERENCES `Staff`(`staff_id` ),FOREIGN KEY (`problem_id` ) REFERENCES `Problems`(`problem_id` ),FOREIGN KEY (`problem_status_code` ) REFERENCES `Problem_Status_Codes`(`problem_status_code` )\\n)', 'Problem_Status_Codes': 'CREATE TABLE `Problem_Status_Codes` (\\n`problem_status_code` VARCHAR(20) PRIMARY KEY,\\n`problem_status_description` VARCHAR(80)\\n)', 'Product': 'CREATE TABLE `Product` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_first_name` VARCHAR(80),\\n`staff_last_name` VARCHAR(80),\\n`other_staff_details` VARCHAR(255)\\n)', 'Problems': 'CREATE TABLE `Problems` (\\n`problem_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`closure_authorised_by_staff_id` INTEGER NOT NULL,\\n`reported_by_staff_id` INTEGER NOT NULL,\\n`date_problem_reported` DATETIME NOT NULL,\\n`date_problem_closed` DATETIME,\\n`problem_description` VARCHAR(255),\\n`other_problem_details` VARCHAR(255),\\nFOREIGN KEY (`closure_authorised_by_staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Product`(`product_id` ),\\nFOREIGN KEY (`reported_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nابحث عن معرّفات المشاكل التي تم الإبلاغ عنها بعد تاريخ 1978-06-26.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT problem_id FROM problems WHERE date_problem_reported > \"1978-06-26\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nكم عدد الفصول التي يدرسها البروفيسور الذي يحمل اسم العائلة جرازتيفسكي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nما اسم الموظف المسؤول عن معلم الجذب السياحي المسمى متحف الولايات المتحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"US museum\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على الأسماء والميزانيات للأقسام التي تزيد ميزانيتها عن المتوسط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dept_name , budget FROM department WHERE budget > (SELECT avg(budget) FROM department)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'building': 'CREATE TABLE \"building\" (\\n\"building_id\" text,\\n\"Name\" text,\\n\"Street_address\" text,\\n\"Years_as_tallest\" text,\\n\"Height_feet\" int,\\n\"Floors\" int,\\nPRIMARY KEY(\"building_id\")\\n)', 'Institution': 'CREATE TABLE \"Institution\" (\\n\"Institution_id\" text,\\n\"Institution\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Type\" text,\\n\"Enrollment\" int,\\n\"Team\" text,\\n\"Primary_Conference\" text,\\n\"building_id\" text,\\nPRIMARY KEY(\"Institution_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"building\"(\"building_id\")\\n)', 'protein': 'CREATE TABLE \"protein\" (\\n\"common_name\" text,\\n\"protein_name\" text,\\n\"divergence_from_human_lineage\" real,\\n\"accession_number\" text,\\n\"sequence_length\" real,\\n\"sequence_identity_to_human_protein\" text,\\n\"Institution_id\" text,\\nPRIMARY KEY(\"common_name\"),\\nFOREIGN KEY(\"Institution_id\") REFERENCES \"Institution\"(\"Institution_id\")\\n)'}\n\n## User-Prompt:\nكم عدد البروتينات المرتبطة بمؤسسة تم تأسيسها بعد عام 1880 أو مؤسسة من النوع خاص؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nكم عدد أفراد الطاقم الذين يعيشون في ولاية جورجيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع الأفلام التي أخرجها ستيفن سبيلبرغ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM Movie WHERE director = 'Steven Spielberg'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nما هي المواقع التي بها مضامير تحتوي على أكثر من 90000 مقعد، ومضامير تحتوي على أقل من 70000 مقعد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هي معرف الطلاب الذين يمتلكون أكثر من حساسية واحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nأورد تفاصيل المشاريع التي تحتوي على نتيجة بحث مفصلة بالجزء الفرعي 'نشرت'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nابحث عن البلد الذي يمتلك أكبر عدد من الملاعب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM stadium WHERE capacity < (SELECT avg(capacity) FROM stadium)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nأي حرم جامعي كان لديه أكثر من ٤٠٠ تسجيل إجمالي ولكن أكثر من ٢٠٠ تسجيل بدوام كامل في عام ١٩٥٦؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'medicine': 'CREATE TABLE \"medicine\" (\\n\"id\" int,\\n\"name\" text,\\n\"Trade_Name\" text,\\n\"FDA_approved\" text,\\nprimary key (\"id\")\\n)', 'enzyme': 'CREATE TABLE \"enzyme\" (\\n\"id\" int,\\n\"name\" text,\\n\"Location\" text,\\n\"Product\" text,\\n\"Chromosome\" text,\\n\"OMIM\" int,\\n\"Porphyria\" text,\\nprimary key (\"id\")\\n)', 'medicine_enzyme_interaction': 'CREATE TABLE \"medicine_enzyme_interaction\" (\\n\"enzyme_id\" int,\\n\"medicine_id\" int,\\n\"interaction_type\" text,\\nprimary key (\"enzyme_id\", \"medicine_id\"),\\nforeign key (\"enzyme_id\") references `enzyme`(\"id\"),\\nforeign key (\"medicine_id\") references `medicine`(\"id\")\\n)'}\n\n## User-Prompt:\nما هو الهوية والاسم للإنزيم الذي لديه أكبر عدد من الأدوية التي يمكن أن تتفاعل معها كـ 'منشط'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nابحث عن عدد الطرق التي لها مطارات وجهة في إيطاليا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(elevation) , country FROM airports GROUP BY country\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nكم عدد الطلاب الذين يتجاوزون متوسط العمر لكل جنس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nما هو الموقع الأكثر شيوعًا بين اللاعبين في مواسم المباريات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nالرجاء سرد العمر والعنوان الشهير للفنانين بترتيب تنازلي حسب العمر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى ومعدل النقاط التراكمي (GPA) للطلاب الذين يمتلكون معدل نقاط أقل من متوسط معدل النقاط التراكمي لجميع الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الفنيين الذين تم تعيينهم لإصلاح الآلات التي تحمل قيمة نقاط أكثر من 70؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد المضامير لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM track\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'product': 'CREATE TABLE \"product\" (\\n\"product_id\" int,\\n\"product\" text,\\n\"dimensions\" text,\\n\"dpi\" real,\\n\"pages_per_minute_color\" real,\\n\"max_page_size\" text,\\n\"interface\" text,\\nPRIMARY KEY (\"product_id\")\\n)', 'store': 'CREATE TABLE \"store\" (\\n\"Store_ID\" int,\\n\"Store_Name\" text,\\n\"Type\" text,\\n\"Area_size\" real,\\n\"Number_of_product_category\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Store_ID\")\\n)', 'district': 'CREATE TABLE \"district\" (\\n\"District_ID\" int,\\n\"District_name\" text,\\n\"Headquartered_City\" text,\\n\"City_Population\" real,\\n\"City_Area\" real,\\nPRIMARY KEY (\"District_ID\")\\n)', 'store_product': 'CREATE TABLE \"store_product\" (\\n\"Store_ID\" int,\\n\"Product_ID\" int,\\nPRIMARY KEY (\"Store_ID\",\"Product_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`Product_ID`) REFERENCES `product`(`Product_ID`)\\n)', 'store_district': 'CREATE TABLE \"store_district\" (\\n\"Store_ID\" int,\\n\"District_ID\" int,\\nPRIMARY KEY (\"Store_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`District_ID`) REFERENCES `district`(`District_ID`)\\n)'}\n\n## User-Prompt:\nما هو أكبر حجم للصفحة الأقصى بين جميع المنتجات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product FROM product WHERE product LIKE \"%Scanner%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nابحث عن أسماء الكليات في LA التي تزيد عن 15000 حجمًا أو في الولاية AZ بأقل من 13000 تسجيل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nأي المؤلفين قدموا تقديمات إلى أكثر من ورشة عمل واحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هو اسم القسم الذي يحتوي على أقل عدد من الأعضاء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nفي أي ولاية يحضر الكلية التي يدرس فيها اللاعب تشارلز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هو إجمالي عدد مباريات مرحلة ما بعد الموسم التي شارك فيها فريق بوسطن ريد ستوكينغز؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nابحث عن اسم وسعة المنتجات التي يكون سعرها أكثر من 700 (بالدولار الأمريكي).\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nما هو تاريخ البيان المؤثر للمطالبة التي تحتوي على أكبر مبلغ من التسوية الإجمالي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nاعثر على أرقام هواتف العملاء الذين يستخدمون نوع السياسة الأكثر شيوعًا بين السياسات المتاحة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nما هي الأسماء والعواصم لكل بلد؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Country_name , Capital FROM country\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nعرض أسماء جميع الأطباء الذين يصفون دواء Thesisin.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = \"Thesisin\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nما هي الأسماء للثلاثة فروع التي تحتوي على أكبر عدد من العضويات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هو السعر المتوسط لكل نوع من أنواع المنتجات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'chip_model': 'CREATE TABLE \"chip_model\" (\\n\"Model_name\" text,\\n\"Launch_year\" real,\\n\"RAM_MiB\" real,\\n\"ROM_MiB\" real,\\n\"Slots\" text,\\n\"WiFi\" text,\\n\"Bluetooth\" text,\\nPRIMARY KEY (\"Model_name\")\\n)', 'screen_mode': 'CREATE TABLE \"screen_mode\" (\\n\"Graphics_mode\" real,\\n\"Char_cells\" text,\\n\"Pixels\" text,\\n\"Hardware_colours\" real,\\n\"used_kb\" real,\\n\"map\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"Graphics_mode\")\\n)', 'phone': 'CREATE TABLE \"phone\" (\\n\"Company_name\" text,\\n\"Hardware_Model_name\" text,\\n\"Accreditation_type\" text,\\n\"Accreditation_level\" text,\\n\"Date\" text,\\n\"chip_model\" text,\\n\"screen_mode\" text,\\nPRIMARY KEY(\"Hardware_Model_name\"),\\nFOREIGN KEY (`screen_mode`) REFERENCES `screen_mode`(`Graphics_mode`),\\nFOREIGN KEY (`chip_model`) REFERENCES `chip_model`(`Model_name`)\\n)'}\n\n## User-Prompt:\nابحث عن متوسط حجم ذاكرة الوصول العشوائي لنماذج الرقاقات التي لم يتم استخدامها في أي هاتف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nقائمة جميع أكواد أنواع المستندات وأسماء أنواع المستندات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Ref_document_types\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nما هو اسم المنطقة التي تحتوي على على الأقل عاصفتين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nابحث عن الرقم التعريفى للدورات التي تم التسجيل فيها أو حضورها من قبل الطالب الذي يحمل رقم تعريفى 121؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nأورد تفاصيل المشروع الذي ينتج كل من براءة اختراع وورقة كنتيجة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\ncustomer_id INTEGER NOT NULL,\\ncustomer_details VARCHAR(255),\\nPRIMARY KEY (customer_id)\\n)', 'Properties': 'CREATE TABLE Properties (\\nproperty_id INTEGER NOT NULL,\\nproperty_type_code CHAR(15) NOT NULL,\\nproperty_address VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (property_id)\\n)', 'Residents': 'CREATE TABLE Residents (\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\ndate_moved_out DATETIME NOT NULL,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, property_id, date_moved_in),\\nFOREIGN KEY (property_id) REFERENCES Properties (property_id)\\n)', 'Organizations': 'CREATE TABLE Organizations (\\norganization_id INTEGER NOT NULL,\\nparent_organization_id INTEGER,\\norganization_details VARCHAR(255),\\nPRIMARY KEY (organization_id)\\n)', 'Services': 'CREATE TABLE Services (\\nservice_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (service_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Residents_Services': 'CREATE TABLE Residents_Services (\\nresident_id INTEGER NOT NULL,\\nservice_id INTEGER NOT NULL,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\ndate_requested DATETIME,\\ndate_provided DATETIME,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, service_id),\\nFOREIGN KEY (service_id) REFERENCES Services (service_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Things': 'CREATE TABLE Things (\\nthing_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nType_of_Thing_Code CHAR(15) NOT NULL,\\nservice_type_code CHAR(10) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (thing_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Customer_Events': 'CREATE TABLE Customer_Events (\\nCustomer_Event_ID INTEGER NOT NULL,\\ncustomer_id INTEGER,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\nresident_id INTEGER,\\nthing_id INTEGER NOT NULL,\\nPRIMARY KEY (Customer_Event_ID),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id),\\nFOREIGN KEY (customer_id) REFERENCES Customers (customer_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Customer_Event_Notes': 'CREATE TABLE Customer_Event_Notes (\\nCustomer_Event_Note_ID INTEGER NOT NULL,\\nCustomer_Event_ID INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\nPRIMARY KEY (Customer_Event_Note_ID),\\nFOREIGN KEY (Customer_Event_ID) REFERENCES Customer_Events (Customer_Event_ID)\\n)', 'Timed_Status_of_Things': 'CREATE TABLE Timed_Status_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Date DATETIME NOT NULL,\\nStatus_of_Thing_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Date, Status_of_Thing_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id)\\n)', 'Timed_Locations_of_Things': 'CREATE TABLE Timed_Locations_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Time DATETIME NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Time, Location_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id))'}\n\n## User-Prompt:\nما هي تفاصيل السكان التي تحتوي على الجزء الفرعي 'آنسة'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(date_moved_in) FROM Residents\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى المختلفة للعملاء من البرازيل الذين لديهم أيضًا فاتورة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Brazil\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nأعط أسماء المصارعين وحركات القضاء لهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nكم عدد الأدوار؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT location_code FROM Ref_locations WHERE location_name = \"Canada\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nأعطني قائمة برقم الهوية والحالة للطلبات التي تنتمي إلى العميل بالاسم 'Jeramie'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nكم عدد العلماء الذين ليس لديهم أي مشروع تم تعيينه لهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأرجع تفاصيل الكثير ومعرفات المستثمرين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nأظهر اسم الموقع ورمزه الذي يحتوي على أقل عدد من الوثائق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nعدد العملاء الذين لديهم حساب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT customer_id) FROM Accounts\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nابحث عن جميع ناشري الفهارس الذين يحتوي اسمهم على Murray.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE \"%Murray%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nما هي بلدان الجبال التي يبلغ ارتفاعها أكثر من 5000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Country FROM mountain WHERE Height > 5000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nما هو إجمالي الراتب الذي دفعه فريق بوسطن ريد ستوكينغز في عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى والهويات للعملاء الذين لديهم حسابين أو أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هو إجمالي عدد العملاء المميزين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customers\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'architect': 'CREATE TABLE \"architect\" (\\n\"id\" text,\\n\"name\" text,\\n\"nationality\" text,\\n\"gender\" text,\\nprimary key(\"id\")\\n)', 'bridge': 'CREATE TABLE \"bridge\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"name\" text,\\n\"location\" text,\\n\"length_meters\" real,\\n\"length_feet\" real,\\nprimary key(\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)', 'mill': 'CREATE TABLE \"mill\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"location\" text,\\n\"name\" text,\\n\"type\" text,\\n\"built_year\" int,\\n\"notes\" text,\\nprimary key (\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أنواع المطاحن المميزة التي تم بناؤها بواسطة مهندسين أمريكيين أو كنديين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.name , T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'architect': 'CREATE TABLE \"architect\" (\\n\"id\" text,\\n\"name\" text,\\n\"nationality\" text,\\n\"gender\" text,\\nprimary key(\"id\")\\n)', 'bridge': 'CREATE TABLE \"bridge\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"name\" text,\\n\"location\" text,\\n\"length_meters\" real,\\n\"length_feet\" real,\\nprimary key(\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)', 'mill': 'CREATE TABLE \"mill\" (\\n\"architect_id\" int,\\n\"id\" int,\\n\"location\" text,\\n\"name\" text,\\n\"type\" text,\\n\"built_year\" int,\\n\"notes\" text,\\nprimary key (\"id\"),\\nforeign key (\"architect_id\" ) references `architect`(\"id\")\\n)'}\n\n## User-Prompt:\nما هي أسماء وسنوات البناء للمطاحن من نوع 'Grondzeiler'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(T1.length_meters) , T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'pilot': 'CREATE TABLE `pilot` (\\n `Pilot_Id` int(11) NOT NULL,\\n `Name` varchar(50) NOT NULL,\\n `Age` int(11) NOT NULL,\\n PRIMARY KEY (`Pilot_Id`)\\n)', 'aircraft': 'CREATE TABLE `aircraft` (\\n \"Aircraft_ID\" int(11) NOT NULL,\\n \"Aircraft\" varchar(50) NOT NULL,\\n \"Description\" varchar(50) NOT NULL,\\n \"Max_Gross_Weight\" varchar(50) NOT NULL,\\n \"Total_disk_area\" varchar(50) NOT NULL,\\n \"Max_disk_Loading\" varchar(50) NOT NULL,\\n PRIMARY KEY (`Aircraft_ID`)\\n)', 'match': 'CREATE TABLE `match` (\\n\"Round\" real,\\n\"Location\" text,\\n\"Country\" text,\\n\"Date\" text,\\n\"Fastest_Qualifying\" text,\\n\"Winning_Pilot\" text,\\n\"Winning_Aircraft\" text,\\nPRIMARY KEY (\"Round\"),\\nFOREIGN KEY (`Winning_Aircraft`) REFERENCES `aircraft`(`Aircraft_ID`),\\nFOREIGN KEY (`Winning_Pilot`) REFERENCES `pilot`(`Pilot_Id`)\\n)', 'airport': 'CREATE TABLE `airport` (\\n\"Airport_ID\" int,\\n\"Airport_Name\" text,\\n\"Total_Passengers\" real,\\n\"%_Change_2007\" text,\\n\"International_Passengers\" real,\\n\"Domestic_Passengers\" real,\\n\"Transit_Passengers\" real,\\n\"Aircraft_Movements\" real,\\n\"Freight_Metric_Tonnes\" real,\\nPRIMARY KEY (\"Airport_ID\")\\n)', 'airport_aircraft': 'CREATE TABLE `airport_aircraft` (\\n\"ID\" int,\\n\"Airport_ID\" int,\\n\"Aircraft_ID\" int,\\nPRIMARY KEY (\"Airport_ID\",\"Aircraft_ID\"),\\nFOREIGN KEY (\"Airport_ID\") REFERENCES `airport`(`Airport_ID`),\\nFOREIGN KEY (\"Aircraft_ID\") REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nما هي أسماء الطيارين بترتيب أبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM pilot ORDER BY Name ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nما هي الرتب التي لدينا لأعضاء هيئة التدريس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Faculty\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هو اسم القسم الذي يحتوي على أعلى عدد من الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Player_Attributes': 'CREATE TABLE \"Player_Attributes\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_fifa_api_id`\\tINTEGER,\\n\\t`player_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`overall_rating`\\tINTEGER,\\n\\t`potential`\\tINTEGER,\\n\\t`preferred_foot`\\tTEXT,\\n\\t`attacking_work_rate`\\tTEXT,\\n\\t`defensive_work_rate`\\tTEXT,\\n\\t`crossing`\\tINTEGER,\\n\\t`finishing`\\tINTEGER,\\n\\t`heading_accuracy`\\tINTEGER,\\n\\t`short_passing`\\tINTEGER,\\n\\t`volleys`\\tINTEGER,\\n\\t`dribbling`\\tINTEGER,\\n\\t`curve`\\tINTEGER,\\n\\t`free_kick_accuracy`\\tINTEGER,\\n\\t`long_passing`\\tINTEGER,\\n\\t`ball_control`\\tINTEGER,\\n\\t`acceleration`\\tINTEGER,\\n\\t`sprint_speed`\\tINTEGER,\\n\\t`agility`\\tINTEGER,\\n\\t`reactions`\\tINTEGER,\\n\\t`balance`\\tINTEGER,\\n\\t`shot_power`\\tINTEGER,\\n\\t`jumping`\\tINTEGER,\\n\\t`stamina`\\tINTEGER,\\n\\t`strength`\\tINTEGER,\\n\\t`long_shots`\\tINTEGER,\\n\\t`aggression`\\tINTEGER,\\n\\t`interceptions`\\tINTEGER,\\n\\t`positioning`\\tINTEGER,\\n\\t`vision`\\tINTEGER,\\n\\t`penalties`\\tINTEGER,\\n\\t`marking`\\tINTEGER,\\n\\t`standing_tackle`\\tINTEGER,\\n\\t`sliding_tackle`\\tINTEGER,\\n\\t`gk_diving`\\tINTEGER,\\n\\t`gk_handling`\\tINTEGER,\\n\\t`gk_kicking`\\tINTEGER,\\n\\t`gk_positioning`\\tINTEGER,\\n\\t`gk_reflexes`\\tINTEGER,\\n\\tFOREIGN KEY(`player_fifa_api_id`) REFERENCES `Player`(`player_fifa_api_id`),\\n\\tFOREIGN KEY(`player_api_id`) REFERENCES `Player`(`player_api_id`)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'Player': 'CREATE TABLE `Player` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`player_api_id`\\tINTEGER UNIQUE,\\n\\t`player_name`\\tTEXT,\\n\\t`player_fifa_api_id`\\tINTEGER UNIQUE,\\n\\t`birthday`\\tTEXT,\\n\\t`height`\\tINTEGER,\\n\\t`weight`\\tINTEGER\\n)', 'League': 'CREATE TABLE `League` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`country_id`\\tINTEGER,\\n\\t`name`\\tTEXT UNIQUE,\\n\\tFOREIGN KEY(`country_id`) REFERENCES `Country`(`id`)\\n)', 'Country': 'CREATE TABLE `Country` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`name`\\tTEXT UNIQUE\\n)', 'Team': 'CREATE TABLE \"Team\" (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_api_id`\\tINTEGER UNIQUE,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_long_name`\\tTEXT,\\n\\t`team_short_name`\\tTEXT\\n)', 'Team_Attributes': 'CREATE TABLE `Team_Attributes` (\\n\\t`id`\\tINTEGER PRIMARY KEY AUTOINCREMENT,\\n\\t`team_fifa_api_id`\\tINTEGER,\\n\\t`team_api_id`\\tINTEGER,\\n\\t`date`\\tTEXT,\\n\\t`buildUpPlaySpeed`\\tINTEGER,\\n\\t`buildUpPlaySpeedClass`\\tTEXT,\\n\\t`buildUpPlayDribbling`\\tINTEGER,\\n\\t`buildUpPlayDribblingClass`\\tTEXT,\\n\\t`buildUpPlayPassing`\\tINTEGER,\\n\\t`buildUpPlayPassingClass`\\tTEXT,\\n\\t`buildUpPlayPositioningClass`\\tTEXT,\\n\\t`chanceCreationPassing`\\tINTEGER,\\n\\t`chanceCreationPassingClass`\\tTEXT,\\n\\t`chanceCreationCrossing`\\tINTEGER,\\n\\t`chanceCreationCrossingClass`\\tTEXT,\\n\\t`chanceCreationShooting`\\tINTEGER,\\n\\t`chanceCreationShootingClass`\\tTEXT,\\n\\t`chanceCreationPositioningClass`\\tTEXT,\\n\\t`defencePressure`\\tINTEGER,\\n\\t`defencePressureClass`\\tTEXT,\\n\\t`defenceAggression`\\tINTEGER,\\n\\t`defenceAggressionClass`\\tTEXT,\\n\\t`defenceTeamWidth`\\tINTEGER,\\n\\t`defenceTeamWidthClass`\\tTEXT,\\n\\t`defenceDefenderLineClass`\\tTEXT,\\n\\tFOREIGN KEY(`team_fifa_api_id`) REFERENCES `Team`(`team_fifa_api_id`),\\n\\tFOREIGN KEY(`team_api_id`) REFERENCES `Team`(`team_api_id`)\\n)'}\n\n## User-Prompt:\nكم عدد الدوريات في إنجلترا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = \"England\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nكم عدد المنتجات التي لها أسعار على الأقل 180؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM products WHERE price >= 180\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأظهر عدد العملاء لكل نوع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT gender , count(*) FROM Customers GROUP BY gender\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nأظهر اسم الرياضة وعدد الطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = \"Football\" AND onscholarship = 'Y'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'School': 'CREATE TABLE \"School\" (\\n\"School_id\" text,\\n\"School_name\" text,\\n\"Location\" text,\\n\"Mascot\" text,\\n\"Enrollment\" int,\\n\"IHSAA_Class\" text,\\n\"IHSAA_Football_Class\" text,\\n\"County\" text,\\nPRIMARY KEY (\"School_id\")\\n)', 'budget': 'CREATE TABLE \"budget\" (\\n\"School_id\" int,\\n\"Year\" int,\\n\"Budgeted\" int,\\n\"total_budget_percent_budgeted\" real,\\n\"Invested\" int,\\n\"total_budget_percent_invested\" real,\\n\"Budget_invested_percent\" text,\\nPRIMARY KEY(\"School_id\",\"YEAR\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n\\n)', 'endowment': 'CREATE TABLE \"endowment\" (\\n\"endowment_id\" int,\\n\"School_id\" int,\\n\"donator_name\" text,\\n\"amount\" real,\\nPRIMARY KEY(\"endowment_id\"),\\nFOREIGN KEY(\"School_id\") REFERENCES \"School\"(\"School_id\")\\n)'}\n\n## User-Prompt:\nأظهر جميع أسماء المتبرعين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT donator_name FROM endowment\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nابحث عن المواقع التي بها مضامير تحتوي على أكثر من 90000 مقعد ومضامير تحتوي على أقل من 70000 مقعد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nأي مشروع أنتج أكبر عدد من النتائج؟ قم بتقديم تفاصيل المشروع ومعرف المشروع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nهل يمكنك سرد أسماء وتقييمات جميع النبيذ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Grape , Appelation FROM WINE\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nما هي المتوسطات والحد الأقصى والإيرادات الإجمالية لجميع الشركات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , headquarter FROM manufacturers ORDER BY revenue DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nأي عملاء قاموا بتقديم ما لا يقل عن طلبين؟ قدم لي اسم كل عميل وعدد الطلبات التي تم تقديمها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nعدّد عدد الأسماء الأخيرة المختلفة التي يمتلكها الممثلون.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT last_name) FROM actor\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nابحث عن عدد الطرق التي تعملها شركة الطيران الأمريكية.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن الأسماء الرسمية للمدن التي يبلغ سكانها أكثر من 1500 أو أقل من 500.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nكم عدد السائقين الذين كانوا في جائزة أستراليا الكبرى التي أقيمت في عام 2009؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = \"Australian Grand Prix\" AND YEAR = 2009\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Album': 'CREATE TABLE `Album` (\\n `AlbumId` integer NOT NULL\\n, `Title` varchar(160) NOT NULL\\n, `ArtistId` integer NOT NULL\\n, PRIMARY KEY (`AlbumId`)\\n, CONSTRAINT `FK_AlbumArtistId` FOREIGN KEY (`ArtistId`) REFERENCES `Artist` (`ArtistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Artist': 'CREATE TABLE `Artist` (\\n `ArtistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`ArtistId`)\\n)', 'Customer': 'CREATE TABLE `Customer` (\\n `CustomerId` integer NOT NULL\\n, `FirstName` varchar(40) NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `Company` varchar(80) DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) NOT NULL\\n, `SupportRepId` integer DEFAULT NULL\\n, PRIMARY KEY (`CustomerId`)\\n, CONSTRAINT `FK_CustomerSupportRepId` FOREIGN KEY (`SupportRepId`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Employee': 'CREATE TABLE `Employee` (\\n `EmployeeId` integer NOT NULL\\n, `LastName` varchar(20) NOT NULL\\n, `FirstName` varchar(20) NOT NULL\\n, `Title` varchar(30) DEFAULT NULL\\n, `ReportsTo` integer DEFAULT NULL\\n, `BirthDate` datetime DEFAULT NULL\\n, `HireDate` datetime DEFAULT NULL\\n, `Address` varchar(70) DEFAULT NULL\\n, `City` varchar(40) DEFAULT NULL\\n, `State` varchar(40) DEFAULT NULL\\n, `Country` varchar(40) DEFAULT NULL\\n, `PostalCode` varchar(10) DEFAULT NULL\\n, `Phone` varchar(24) DEFAULT NULL\\n, `Fax` varchar(24) DEFAULT NULL\\n, `Email` varchar(60) DEFAULT NULL\\n, PRIMARY KEY (`EmployeeId`)\\n, CONSTRAINT `FK_EmployeeReportsTo` FOREIGN KEY (`ReportsTo`) REFERENCES `Employee` (`EmployeeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Genre': 'CREATE TABLE `Genre` (\\n `GenreId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`GenreId`)\\n)', 'Invoice': 'CREATE TABLE `Invoice` (\\n `InvoiceId` integer NOT NULL\\n, `CustomerId` integer NOT NULL\\n, `InvoiceDate` datetime NOT NULL\\n, `BillingAddress` varchar(70) DEFAULT NULL\\n, `BillingCity` varchar(40) DEFAULT NULL\\n, `BillingState` varchar(40) DEFAULT NULL\\n, `BillingCountry` varchar(40) DEFAULT NULL\\n, `BillingPostalCode` varchar(10) DEFAULT NULL\\n, `Total` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`InvoiceId`)\\n, CONSTRAINT `FK_InvoiceCustomerId` FOREIGN KEY (`CustomerId`) REFERENCES `Customer` (`CustomerId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'InvoiceLine': 'CREATE TABLE `InvoiceLine` (\\n `InvoiceLineId` integer NOT NULL\\n, `InvoiceId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, `Quantity` integer NOT NULL\\n, PRIMARY KEY (`InvoiceLineId`)\\n, CONSTRAINT `FK_InvoiceLineInvoiceId` FOREIGN KEY (`InvoiceId`) REFERENCES `Invoice` (`InvoiceId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_InvoiceLineTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'MediaType': 'CREATE TABLE `MediaType` (\\n `MediaTypeId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`MediaTypeId`)\\n)', 'Playlist': 'CREATE TABLE `Playlist` (\\n `PlaylistId` integer NOT NULL\\n, `Name` varchar(120) DEFAULT NULL\\n, PRIMARY KEY (`PlaylistId`)\\n)', 'PlaylistTrack': 'CREATE TABLE `PlaylistTrack` (\\n `PlaylistId` integer NOT NULL\\n, `TrackId` integer NOT NULL\\n, PRIMARY KEY (`PlaylistId`,`TrackId`)\\n, CONSTRAINT `FK_PlaylistTrackPlaylistId` FOREIGN KEY (`PlaylistId`) REFERENCES `Playlist` (`PlaylistId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_PlaylistTrackTrackId` FOREIGN KEY (`TrackId`) REFERENCES `Track` (`TrackId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'Track': 'CREATE TABLE `Track` (\\n `TrackId` integer NOT NULL\\n, `Name` varchar(200) NOT NULL\\n, `AlbumId` integer DEFAULT NULL\\n, `MediaTypeId` integer NOT NULL\\n, `GenreId` integer DEFAULT NULL\\n, `Composer` varchar(220) DEFAULT NULL\\n, `Milliseconds` integer NOT NULL\\n, `Bytes` integer DEFAULT NULL\\n, `UnitPrice` decimal(10,2) NOT NULL\\n, PRIMARY KEY (`TrackId`)\\n, CONSTRAINT `FK_TrackAlbumId` FOREIGN KEY (`AlbumId`) REFERENCES `Album` (`AlbumId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackGenreId` FOREIGN KEY (`GenreId`) REFERENCES `Genre` (`GenreId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n, CONSTRAINT `FK_TrackMediaTypeId` FOREIGN KEY (`MediaTypeId`) REFERENCES `MediaType` (`MediaTypeId`) ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nاعثر على عناوين الألبومات التي تحتوي على مسارات لكل من الأنواع 'الريغي' و 'الروك'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الاسم الكامل، تاريخ التوظيف، الراتب، ومعرّف القسم للموظفين الذين لا يحتوون على الحرف M في أسمائهم الأولى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Investors': 'CREATE TABLE `Investors` (\\n`investor_id` INTEGER PRIMARY KEY,\\n`Investor_details` VARCHAR(255)\\n)', 'Lots': 'CREATE TABLE `Lots` (\\n`lot_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`lot_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` )\\n)', 'Ref_Transaction_Types': 'CREATE TABLE `Ref_Transaction_Types` (\\n`transaction_type_code` VARCHAR(10) PRIMARY KEY,\\n`transaction_type_description` VARCHAR(80) NOT NULL\\n)', 'Transactions': 'CREATE TABLE `Transactions` (\\n`transaction_id` INTEGER PRIMARY KEY,\\n`investor_id` INTEGER NOT NULL,\\n`transaction_type_code` VARCHAR(10) NOT NULL,\\n`date_of_transaction` DATETIME,\\n`amount_of_transaction` DECIMAL(19,4),\\n`share_count` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`investor_id` ) REFERENCES `Investors`(`investor_id` ),FOREIGN KEY (`transaction_type_code` ) REFERENCES `Ref_Transaction_Types`(`transaction_type_code` )\\n)', 'Sales': 'CREATE TABLE `Sales` (\\n`sales_transaction_id` INTEGER PRIMARY KEY,\\n`sales_details` VARCHAR(255),\\nFOREIGN KEY (`sales_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Purchases': 'CREATE TABLE `Purchases` (\\n`purchase_transaction_id` INTEGER NOT NULL,\\n`purchase_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`purchase_transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)', 'Transactions_Lots': 'CREATE TABLE `Transactions_Lots` (\\n`transaction_id` INTEGER NOT NULL,\\n`lot_id` INTEGER NOT NULL,\\nFOREIGN KEY (`lot_id` ) REFERENCES `Lots`(`lot_id` ),\\nFOREIGN KEY (`transaction_id` ) REFERENCES `Transactions`(`transaction_id` )\\n)'}\n\n## User-Prompt:\nأظهر الحد الأقصى لمبلغ المعاملة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT lot_details FROM LOTS\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء تسجيل الدخول المستخدمة من قبل بعض مؤلفي المقررات وبعض الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر العناوين وأرقام الهواتف لجميع المباني التي يديرها بريندن.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو الاسم الكامل للموظف الذي لديه أكبر عدد من العملاء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nعد عدد ألعاب الفيديو التي لها نوع Massively multiplayer online game.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Video_games WHERE gtype = \"Massively multiplayer online game\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nاعثر على عدد أعضاء نادي Pen and Paper Gaming.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nمن فضلك، لكل حزب، ارجع اسم الحزب وعدد المندوبين من تلك الحزب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Party , COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nفي أي عام دخل أقل عدد من الأشخاص في قاعة المشاهير؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nكم عدد الأسماء في مقاطعة نابا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هو رمز طريقة الدفع المستخدم في معظم الطلبات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nكم عدد البطاقات التي يمتلكها العميل Art Turcotte؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(15),\\n`product_name` VARCHAR(80),\\n`product_price` DOUBLE NULL\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15),\\n`customer_number` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Contacts': 'CREATE TABLE `Contacts` (\\n`contact_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(50),\\n`contact_phone` VARCHAR(80)\\n)', 'Customer_Address_History': 'CREATE TABLE `Customer_Address_History` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_date` DATETIME NOT NULL,\\n`order_status_code` VARCHAR(15),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER NOT NULL ,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(80),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nكم عدد المنتجات التي تمتلك سعرًا أعلى من المتوسط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT min(product_price) , max(product_price) , avg(product_price) FROM products\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nأرجع اسم الفريق ونقاط المؤتمر الأطلسي الساحلي خلال الموسم العادي للمدرسة التي تأسست في أقرب وقت.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nكم عدد الأغاني التي تحتوي على أصوات نوع رئيسي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"lead\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nكم عدد الكليات التي لديها أكثر من 15000 طالب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Player WHERE HS > 1000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هو الاسم الأول والاسم الأخير لجميع السائقين الألمان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT forename , surname FROM drivers WHERE nationality = \"German\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nاعثر على اسم السكن الجامعي الذي يمكن أن يستوعب أكثر من 300 طالب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT dorm_name FROM dorm WHERE gender = 'F'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nابحث عن اسم وعنوان البريد الإلكتروني للمستخدم الذي يتابعه أقل عدد من الأشخاص.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , email FROM user_profiles ORDER BY followers LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nكم عدد الطلاب الذين يتأثرون بحساسية تجاه القطط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nكم عدد الأغاني التي تستخدم الطبول كآلة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM instruments WHERE instrument = \"drums\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي المقاطعة التي تنتج أكبر كمية من النبيذ بتقييم يتجاوز 90؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nابحث عن الكمية الإجمالية للمنتجات المرتبطة بالطلبات في حالة 'تم الإلغاء'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.customer_name , t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = \"Delivered\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nكم عدد المرضى الذين لا يستخدمون بروكراستين-إكس كدواء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Representative_ID\" int,\\n\"Date\" text,\\n\"Votes\" real,\\n\"Vote_Percent\" real,\\n\"Seats\" real,\\n\"Place\" real,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\\n)', 'representative': 'CREATE TABLE \"representative\" (\\n\"Representative_ID\" int,\\n\"Name\" text,\\n\"State\" text,\\n\"Party\" text,\\n\"Lifespan\" text,\\nPRIMARY KEY (\"Representative_ID\")\\n)'}\n\n## User-Prompt:\nأذكر الأصوات للانتخابات بترتيب تنازلي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Votes FROM election ORDER BY Votes DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nكم عدد الأجهزة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nما هي جميع أنواع النماذج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هي فرق الفنيين المختلفة وعدد الفنيين في كل فريق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Team , COUNT(*) FROM technician GROUP BY Team\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nعرض جميع التصويتات المميزة التي تمت للرئيس في 08/30/2015.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = \"08/30/2015\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nأي الولايات تحتوي على أكثر من حديقتين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT state FROM park GROUP BY state HAVING count(*) > 2;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"name\" text,\\n\"Region\" text,\\n\"Start_year\" text,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'club_rank': 'CREATE TABLE \"club_rank\" (\\n\"Rank\" real,\\n\"Club_ID\" int,\\n\"Gold\" real,\\n\"Silver\" real,\\n\"Bronze\" real,\\n\"Total\" real,\\nPRIMARY KEY (\"Rank\",\"Club_ID\")\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"name\" text,\\n\"Position\" text,\\n\"Club_ID\" int,\\n\"Apps\" real,\\n\"Tries\" real,\\n\"Goals\" text,\\n\"Points\" real,\\nPRIMARY KEY (\"Player_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'competition': 'CREATE TABLE \"competition\" (\\n\"Competition_ID\" int,\\n\"Year\" real,\\n\"Competition_type\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Competition_ID\")\\n)', 'competition_result': 'CREATE TABLE \"competition_result\" (\\n\"Competition_ID\" int,\\n\"Club_ID_1\" int,\\n\"Club_ID_2\" int,\\n\"Score\" text,\\nPRIMARY KEY (\"Competition_ID\",\"Club_ID_1\",\"Club_ID_2\"),\\nFOREIGN KEY (`Club_ID_1`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Club_ID_2`) REFERENCES `club`(`Club_ID`),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `competition`(`Competition_ID`)\\n)'}\n\n## User-Prompt:\nما هي أوضاع كل من اللاعبين اللذين يمتلكان أكثر من 20 نقطة وأقل من 10 نقاط؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام تعريفية الطلاب الذين حضروا دورات في قسم الإحصاء بترتيب تاريخ الحضور.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nفي أي مدينة يعيش الطالب الذي يحمل اللقب Kim؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT city_code FROM Student WHERE LName = \"Kim\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'device': 'CREATE TABLE \"device\" (\\n\"Device_ID\" int,\\n\"Device\" text,\\n\"Carrier\" text,\\n\"Package_Version\" text,\\n\"Applications\" text,\\n\"Software_Platform\" text,\\nPRIMARY KEY (\"Device_ID\")\\n)', 'shop': 'CREATE TABLE \"shop\" (\\n\"Shop_ID\" int,\\n\"Shop_Name\" text,\\n\"Location\" text,\\n\"Open_Date\" text,\\n\"Open_Year\" int,\\nPRIMARY KEY (\"Shop_ID\")\\n)', 'stock': 'CREATE TABLE \"stock\" (\\n\"Shop_ID\" int,\\n\"Device_ID\" int,\\n\"Quantity\" int,\\nPRIMARY KEY (\"Shop_ID\",\"Device_ID\"),\\nFOREIGN KEY (`Shop_ID`) REFERENCES `shop`(`Shop_ID`),\\nFOREIGN KEY (`Device_ID`) REFERENCES `device`(`Device_ID`)\\n)'}\n\n## User-Prompt:\nما هو اسم المتجر المقابل للمتجر الذي افتتح في السنة الأخيرة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء الدورات التي يدرّسها المعلّم الذي يحمل اسم جوليو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nالبحث عن أسماء المؤسسات التي تحتوي على كلمة 'Party'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nما هو رقم تعريفى التقسيم للمستخدم الذي يحمل اسم آيرون مان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT partitionid FROM user_profiles WHERE name = 'Iron Man'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nكم عدد المطارات في كل بلد؟ قم بترتيب البلدان بتناقص عدد المطارات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'workshop': 'CREATE TABLE \"workshop\" (\\n\"Workshop_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Name\" text,\\nPRIMARY KEY (\"Workshop_ID\")\\n)', 'submission': 'CREATE TABLE \"submission\" (\\n\"Submission_ID\" int,\\n\"Scores\" real,\\n\"Author\" text,\\n\"College\" text,\\nPRIMARY KEY (\"Submission_ID\")\\n)', 'Acceptance': 'CREATE TABLE \"Acceptance\" (\\n\"Submission_ID\" int,\\n\"Workshop_ID\" int,\\n\"Result\" text,\\nPRIMARY KEY (\"Submission_ID\",\"Workshop_ID\"),\\nFOREIGN KEY (\"Submission_ID\") REFERENCES `submission`(\"Submission_ID\"),\\nFOREIGN KEY (\"Workshop_ID\") REFERENCES `workshop`(\"Workshop_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء المؤلفين من الكلية Florida أو Temple.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Author , College FROM submission\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nقائمة بجميع أسماء المستندات التي تحتوي على CV.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي أسماء السباقات التي أُقيمت بين عامي 2009 و 2011؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هي الأرقام تعريفية لجميع الموظفين الذين ليس لديهم شهادات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nمن هم المستشارون للطلاب الذين يعيشون في مدينة تحمل رمز BAL؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء الأغاني التي يكون تنسيقها mp3 ودقتها أقل من 1000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي أسماء المطربين الذين ينتمون إلى المملكة المتحدة وأصدروا أغنية باللغة الإنجليزية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" INTERSECT SELECT song_name FROM song WHERE resolution < 1000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nابحث عن تاريخ أصبحوا عملاء للعملاء الذين يمتلكون معرفًا بين 10 و20.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_name FROM customers WHERE payment_method = \"Cash\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'event': 'CREATE TABLE \"event\" (\\n \"Event_ID\" int,\\n \"Date\" text,\\n \"Venue\" text,\\n \"Name\" text,\\n \"Event_Attendance\" int,\\n PRIMARY KEY (\"Event_ID\")\\n)', 'journalist': 'CREATE TABLE \"journalist\" (\\n \"journalist_ID\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Age\" text,\\n \"Years_working\" int,\\n PRIMARY KEY (\"journalist_ID\")\\n)', 'news_report': 'CREATE TABLE \"news_report\" (\\n \"journalist_ID\" int,\\n \"Event_ID\" int,\\n \"Work_Type\" text,\\n PRIMARY KEY (\"journalist_ID\",\"Event_ID\"),\\n FOREIGN KEY (\"journalist_ID\") REFERENCES `journalist`(\"journalist_ID\"),\\n FOREIGN KEY (\"Event_ID\") REFERENCES `event`(\"Event_ID\")\\n)'}\n\n## User-Prompt:\nما هي جنسية الصحفي الذي يمتلك أكبر عدد من السنوات في العمل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Years_working) FROM journalist\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nإرجاع معرفات جميع المنتجات التي يتم توريدها بواسطة مورد ذو معرف 2 وتكون أغلى من السعر المتوسط لجميع المنتجات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هي الوجهات وعدد الرحلات إلى كل واحدة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT destination , count(*) FROM Flight GROUP BY destination\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nكم عدد محطات الوقود التي تم فتحها بين عامي 2000 و 2005؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Attribute_Definitions': 'CREATE TABLE `Attribute_Definitions` (\\n`attribute_id` INTEGER PRIMARY KEY,\\n`attribute_name` VARCHAR(30),\\n`attribute_data_type` VARCHAR(10)\\n)', 'Catalogs': 'CREATE TABLE `Catalogs` (\\n`catalog_id` INTEGER PRIMARY KEY,\\n`catalog_name` VARCHAR(50),\\n`catalog_publisher` VARCHAR(80),\\n`date_of_publication` DATETIME,\\n`date_of_latest_revision` DATETIME\\n)', 'Catalog_Structure': 'CREATE TABLE `Catalog_Structure` (\\n`catalog_level_number` INTEGER PRIMARY KEY,\\n`catalog_id` INTEGER NOT NULL,\\n`catalog_level_name` VARCHAR(50),\\nFOREIGN KEY (`catalog_id` ) REFERENCES `Catalogs`(`catalog_id` )\\n)', 'Catalog_Contents': 'CREATE TABLE `Catalog_Contents` (\\n`catalog_entry_id` INTEGER PRIMARY KEY,\\n`catalog_level_number` INTEGER NOT NULL,\\n`parent_entry_id` INTEGER,\\n`previous_entry_id` INTEGER,\\n`next_entry_id` INTEGER,\\n`catalog_entry_name` VARCHAR(80),\\n`product_stock_number` VARCHAR(50),\\n`price_in_dollars` DOUBLE NULL,\\n`price_in_euros` DOUBLE NULL,\\n`price_in_pounds` DOUBLE NULL,\\n`capacity` VARCHAR(20),\\n`length` VARCHAR(20),\\n`height` VARCHAR(20),\\n`width` VARCHAR(20),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)', 'Catalog_Contents_Additional_Attributes': 'CREATE TABLE `Catalog_Contents_Additional_Attributes` (\\n`catalog_entry_id` INTEGER NOT NULL,\\n`catalog_level_number` INTEGER NOT NULL,\\n`attribute_id` INTEGER NOT NULL,\\n`attribute_value` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`catalog_entry_id` ) REFERENCES `Catalog_Contents`(`catalog_entry_id` ),\\nFOREIGN KEY (`catalog_level_number` ) REFERENCES `Catalog_Structure`(`catalog_level_number` )\\n)'}\n\n## User-Prompt:\nابحث عن أسماء المنتجات التي يكون طولها أقل من 3 أو ارتفاعها أكثر من 5.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n \"Artist_ID\" int,\\n \"Artist\" text,\\n \"Age\" int,\\n \"Famous_Title\" text,\\n \"Famous_Release_date\" text,\\n PRIMARY KEY (\"Artist_ID\")\\n)', 'volume': 'CREATE TABLE \"volume\" (\\n \"Volume_ID\" int,\\n \"Volume_Issue\" text,\\n \"Issue_Date\" text,\\n \"Weeks_on_Top\" real,\\n \"Song\" text,\\n \"Artist_ID\" int,\\n PRIMARY KEY (\"Volume_ID\"),\\n FOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'music_festival': 'CREATE TABLE \"music_festival\" (\\n \"ID\" int,\\n \"Music_Festival\" text,\\n \"Date_of_ceremony\" text,\\n \"Category\" text,\\n \"Volume\" int,\\n \"Result\" text,\\n PRIMARY KEY (`ID`),\\n FOREIGN KEY (`Volume`) REFERENCES `volume`(`Volume_ID`)\\n)'}\n\n## User-Prompt:\nما هي أقصى وأدنى أسبوع في أعلى جميع الأصوات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Category FROM music_festival WHERE RESULT = \"Awarded\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'candidate': 'CREATE TABLE \"candidate\" (\\n\"Candidate_ID\" int,\\n\"People_ID\" int,\\n\"Poll_Source\" text,\\n\"Date\" text,\\n\"Support_rate\" real,\\n\"Consider_rate\" real,\\n\"Oppose_rate\" real,\\n\"Unsure_rate\" real,\\nPRIMARY KEY (\"Candidate_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Sex\" text,\\n\"Name\" text,\\n\"Date_of_Birth\" text,\\n\"Height\" real,\\n\"Weight\" real,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي جميع المعلومات حول جميع الأشخاص؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT * FROM people\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"id\" int,\\n\"name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nprimary key(\"id\")\\n)', 'camera_lens': 'CREATE TABLE \"camera_lens\" (\\n\"id\" int,\\n\"brand\" text,\\n\"name\" text,\\n\"focal_length_mm\" real,\\n\"max_aperture\" real,\\nprimary key(\"id\")\\n)', 'photos': 'CREATE TABLE \"photos\" (\\n\"id\" int, \\n\"camera_lens_id\" int,\\n\"mountain_id\" int,\\n\"color\" text, \\n\"name\" text,\\nprimary key(\"id\"),\\nforeign key(\"camera_lens_id\") references `camera_lens`(\"id\"),\\nforeign key(\"mountain_id\") references `mountain`(\"id\")\\n)'}\n\n## User-Prompt:\nما هو اسم كل عدسة كاميرا وعدد الصور التي تم التقاطها بها؟ قم بترتيب النتيجة حسب عدد الصور.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM camera_lens WHERE name LIKE \"%Digital%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nاعرض جميع أسماء الفنانين وعدد المعارض لكل فنان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هو جنس الفنان واسمه الذي أنتج الأغنية ذات الدقة الأدنى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(rating) , languages FROM song GROUP BY languages\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Discount_Coupons': 'CREATE TABLE `Discount_Coupons` (\\n`coupon_id` INTEGER PRIMARY KEY,\\n`date_issued` DATETIME,\\n`coupon_amount` DECIMAL(19,4)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`coupon_id` INTEGER NOT NULL,\\n`good_or_bad_customer` VARCHAR(4),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`date_became_customer` DATETIME,\\n`date_last_hire` DATETIME,\\nFOREIGN KEY (`coupon_id` ) REFERENCES `Discount_Coupons`(`coupon_id` )\\n)', 'Bookings': 'CREATE TABLE `Bookings` (\\n`booking_id` INTEGER PRIMARY KEY ,\\n`customer_id` INTEGER NOT NULL,\\n`booking_status_code` VARCHAR(10) NOT NULL,\\n`returned_damaged_yn` VARCHAR(40),\\n`booking_start_date` DATETIME,\\n`booking_end_date` DATETIME,\\n`count_hired` VARCHAR(40),\\n`amount_payable` DECIMAL(19,4),\\n`amount_of_discount` DECIMAL(19,4),\\n`amount_outstanding` DECIMAL(19,4),\\n`amount_of_refund` DECIMAL(19,4),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products_for_Hire': 'CREATE TABLE `Products_for_Hire` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(15) NOT NULL,\\n`daily_hire_cost` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255)\\n)', 'Payments': 'CREATE TABLE `Payments` (\\n`payment_id` INTEGER PRIMARY KEY,\\n`booking_id` INTEGER,\\n`customer_id` INTEGER NOT NULL,\\n`payment_type_code` VARCHAR(15) NOT NULL,\\n`amount_paid_in_full_yn` VARCHAR(1),\\n`payment_date` DATETIME,\\n`amount_due` DECIMAL(19,4),\\n`amount_paid` DECIMAL(19,4),\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products_Booked': 'CREATE TABLE `Products_Booked` (\\n`booking_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`returned_yn` VARCHAR(1),\\n`returned_late_yn` VARCHAR(1),\\n`booked_count` INTEGER,\\n`booked_amount` FLOAT NULL,\\nPRIMARY KEY (`booking_id`, `product_id`)\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )\\n)', 'View_Product_Availability': 'CREATE TABLE `View_Product_Availability` (\\n`product_id` INTEGER NOT NULL,\\n`booking_id` INTEGER NOT NULL,\\n`status_date` DATETIME PRIMARY KEY,\\n`available_yn` VARCHAR(1),\\nFOREIGN KEY (`booking_id` ) REFERENCES `Bookings`(`booking_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products_for_Hire`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو العدد الأقصى، والعدد الأدنى، والمتوسط لعدد الحجوزات للمنتجات المحجوزة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(booked_count) , min(booked_count) , avg(booked_count) FROM products_booked\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'aircraft': 'CREATE TABLE \"aircraft\" (\\n\"Aircraft_ID\" int,\\n\"Order_Year\" int,\\n\"Manufacturer\" text,\\n\"Model\" text,\\n\"Fleet_Series\" text,\\n\"Powertrain\" text,\\n\"Fuel_Propulsion\" text,\\nPRIMARY KEY (\"Aircraft_ID\")\\n)', 'pilot': 'CREATE TABLE \"pilot\" (\\n\"Pilot_ID\" int,\\n\"Pilot_name\" text,\\n\"Rank\" int,\\n\"Age\" int,\\n\"Nationality\" text,\\n\"Position\" text,\\n\"Join_Year\" int,\\n\"Team\" text,\\nPRIMARY KEY (\"Pilot_ID\")\\n)', 'pilot_record': 'CREATE TABLE \"pilot_record\" (\\n\"Record_ID\" int,\\n\"Pilot_ID\" int,\\n\"Aircraft_ID\" int,\\n\"Date\" text,\\nPRIMARY KEY (\"Pilot_ID\", \"Aircraft_ID\", \"Date\"),\\nFOREIGN KEY (`Pilot_ID`) REFERENCES `pilot`(`Pilot_ID`),\\nFOREIGN KEY (`Aircraft_ID`) REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nأظهر أسماء الطيارين وسلسلة الأسطول للطائرات التي قاموا بالطيران بها بترتيب تصاعدي حسب رتبة الطيار.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nأظهر هويات الطلاب الذين ليس لديهم أي رياضة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هو أعلى تقييم لأحدث فيلم ومتى تم إصداره؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nابحث عن تفاصيل جميع العملاء المميزين الذين لديهم طلبات بحالة On Road.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع المراجعين الذين لديهم تقييمات بقيمة NULL للتاريخ؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nما هو عدد الغرف التي تحتوي على سرير ملكي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Rooms;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'buildings': 'CREATE TABLE \"buildings\" (\\n\"id\" int,\\n\"name\" text,\\n\"City\" text,\\n\"Height\" int,\\n\"Stories\" int,\\n\"Status\" text,\\nPRIMARY KEY(\"id\")\\n)', 'Companies': 'CREATE TABLE \"Companies\" (\\n\"id\" int,\\n\"name\" text,\\n\"Headquarters\" text,\\n\"Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value_billion\" text,\\nPRIMARY KEY (\"id\")\\n)', 'Office_locations': 'CREATE TABLE \"Office_locations\" (\\n\"building_id\" int,\\n\"company_id\" int,\\n\"move_in_year\" int,\\nPRIMARY KEY (\"building_id\", \"company_id\"),\\nFOREIGN KEY (\"building_id\") REFERENCES \"buildings\"(\"id\"),\\nFOREIGN KEY (\"company_id\") REFERENCES \"Companies\"(\"id\")\\n)'}\n\n## User-Prompt:\nاحسب عدد الصناعات المختلفة للشركات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT Industry) FROM Companies\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الأشخاص الذين هم أصدقاء مع أليس لأقصر سنوات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nأورد جميع أصول البرامج بالترتيب الأبجدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'chip_model': 'CREATE TABLE \"chip_model\" (\\n\"Model_name\" text,\\n\"Launch_year\" real,\\n\"RAM_MiB\" real,\\n\"ROM_MiB\" real,\\n\"Slots\" text,\\n\"WiFi\" text,\\n\"Bluetooth\" text,\\nPRIMARY KEY (\"Model_name\")\\n)', 'screen_mode': 'CREATE TABLE \"screen_mode\" (\\n\"Graphics_mode\" real,\\n\"Char_cells\" text,\\n\"Pixels\" text,\\n\"Hardware_colours\" real,\\n\"used_kb\" real,\\n\"map\" text,\\n\"Type\" text,\\nPRIMARY KEY (\"Graphics_mode\")\\n)', 'phone': 'CREATE TABLE \"phone\" (\\n\"Company_name\" text,\\n\"Hardware_Model_name\" text,\\n\"Accreditation_type\" text,\\n\"Accreditation_level\" text,\\n\"Date\" text,\\n\"chip_model\" text,\\n\"screen_mode\" text,\\nPRIMARY KEY(\"Hardware_Model_name\"),\\nFOREIGN KEY (`screen_mode`) REFERENCES `screen_mode`(`Graphics_mode`),\\nFOREIGN KEY (`chip_model`) REFERENCES `chip_model`(`Model_name`)\\n)'}\n\n## User-Prompt:\nابحث عن مستوى التصديق الذي يستخدمه أكثر من 3 هواتف.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*) > 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'item': 'CREATE TABLE `item` (\\n `i_id` integer NOT NULL\\n, `title` varchar(20) DEFAULT NULL\\n, PRIMARY KEY (`i_id`)\\n)', 'review': 'CREATE TABLE `review` (\\n `a_id` integer NOT NULL PRIMARY KEY\\n, `u_id` integer NOT NULL\\n, `i_id` integer NOT NULL\\n, `rating` integer DEFAULT NULL\\n, `rank` integer DEFAULT NULL\\n, \\tFOREIGN KEY (`u_id`) REFERENCES `useracct`(`u_id`)\\n, \\tFOREIGN KEY (`i_id`) REFERENCES `item`(`i_id`)\\n)', 'useracct': 'CREATE TABLE `useracct` (\\n `u_id` integer NOT NULL\\n, `name` varchar(128) DEFAULT NULL\\n, PRIMARY KEY (`u_id`)\\n)', 'trust': 'CREATE TABLE \"trust\" (`source_u_id` integer NOT NULL, `target_u_id` integer NOT NULL, `trust` integer NOT NULL, FOREIGN KEY (`source_u_id`) REFERENCES `useracct`(`u_id`), FOREIGN KEY (`target_u_id`) REFERENCES `useracct`(`u_id`))'}\n\n## User-Prompt:\nما هو اسم المستخدم الذي قدم أعلى تقييم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nابحث عن إجمالي عدد الوصول لجميع المستندات في نوع المستند الأكثر شيوعًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nما هي الهواتف والبريد الإلكتروني لمجموعات ورش العمل التي يتم أداؤها فيها الخدمات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء الأعضاء ومدن الإقامة لأولئك الذين سجلوا في فرع في عام 2016؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nأظهر جميع رموز الأدوار وعدد الموظفين في كل دور.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_name FROM Employees WHERE role_code = \"HR\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nكم عدد شركات الطيران في روسيا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM airlines\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nابحث عن الرتبة في هيئة التدريس التي تحمل أقل عدد من الأعضاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nابحث عن جميع التفاصيل لكل سباح.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nلكل مستشار، أبلغ عن العدد الإجمالي للطلاب الذين تمت مشورتهم من قبله.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"8741\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو وصف اللون للمنتج بالاسم القطنبة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nعد عدد الفنانين الذين تجاوزوا سن ال 46 وانضموا بعد عام 1990.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nكم عدد التصويتات الرئاسية المميزة المسجلة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT President_Vote) FROM VOTING_RECORD\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nسجل أقصى نقاط لفريق بوسطن ريد ستوكينغز عندما فاز الفريق في مرحلة ما بعد الموسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هي جميع أسماء محطات البداية المختلفة لرحلة استمرت أقل من 100؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT start_station_name FROM trip WHERE duration < 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nعدد أنواع الحسابات المختلفة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT acc_type) FROM customer\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nما هي نقاط جميع المباريات والموقع للمدرسة المعروفة باسم Clemson؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'event': 'CREATE TABLE \"event\" (\\n \"Event_ID\" int,\\n \"Date\" text,\\n \"Venue\" text,\\n \"Name\" text,\\n \"Event_Attendance\" int,\\n PRIMARY KEY (\"Event_ID\")\\n)', 'journalist': 'CREATE TABLE \"journalist\" (\\n \"journalist_ID\" int,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Age\" text,\\n \"Years_working\" int,\\n PRIMARY KEY (\"journalist_ID\")\\n)', 'news_report': 'CREATE TABLE \"news_report\" (\\n \"journalist_ID\" int,\\n \"Event_ID\" int,\\n \"Work_Type\" text,\\n PRIMARY KEY (\"journalist_ID\",\"Event_ID\"),\\n FOREIGN KEY (\"journalist_ID\") REFERENCES `journalist`(\"journalist_ID\"),\\n FOREIGN KEY (\"Event_ID\") REFERENCES `event`(\"Event_ID\")\\n)'}\n\n## User-Prompt:\nما هو متوسط عدد السنوات التي قضاها الصحفيون في العمل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM journalist WHERE Nationality = \"England\" OR Nationality = \"Wales\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nكم عدد حجوزات الشقق في المجموع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Apartment_Bookings\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'basketball_match': 'CREATE TABLE \"basketball_match\" (\\n\"Team_ID\" int,\\n\"School_ID\" int,\\n\"Team_Name\" text,\\n\"ACC_Regular_Season\" text,\\n\"ACC_Percent\" text,\\n\"ACC_Home\" text,\\n\"ACC_Road\" text,\\n\"All_Games\" text,\\n\"All_Games_Percent\" int,\\n\"All_Home\" text,\\n\"All_Road\" text,\\n\"All_Neutral\" text,\\nPRIMARY KEY (\"Team_ID\"),\\nFOREIGN KEY (`School_ID`) REFERENCES `university`(`School_ID`)\\n)', 'university': 'CREATE TABLE \"university\" (\\n\"School_ID\" int,\\n\"School\" text,\\n\"Location\" text,\\n\"Founded\" real,\\n\"Affiliation\" text,\\n\"Enrollment\" real,\\n\"Nickname\" text,\\n\"Primary_conference\" text,\\nPRIMARY KEY (\"School_ID\")\\n)'}\n\n## User-Prompt:\nاحسب عدد المدارس التي شاركت في مباريات كرة السلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT school_id) FROM basketball_match\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هو عدد التصويتات الرئاسية المميزة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM VOTING_RECORD\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nابحث عن المتوسط ​​لعدد الغرف في الشقق التي تحمل رمز النوع Studio.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'gymnast': 'CREATE TABLE \"gymnast\" (\\n\"Gymnast_ID\" int,\\n\"Floor_Exercise_Points\" real,\\n\"Pommel_Horse_Points\" real,\\n\"Rings_Points\" real,\\n\"Vault_Points\" real,\\n\"Parallel_Bars_Points\" real,\\n\"Horizontal_Bar_Points\" real,\\n\"Total_Points\" real,\\nPRIMARY KEY (\"Gymnast_ID\"),\\nFOREIGN KEY (\"Gymnast_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\n\"Height\" real,\\n\"Hometown\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nاظهر المدن الأصلية المشتركة بين الأشخاص الذين تزيد أعمارهم عن 23 وأقل من 20 عامًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nاعثر على 5 عملاء قاموا بشراء شيء مؤخرًا. عرض أسماء العملاء الأول والأخير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nأظهر رموز المواقع التي تحتوي على ما لا يقل عن 3 وثائق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين لديهم حسابات، وكم عدد حسابات الفحص لكل منهم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nما هو اسم العميل الذي قام بالطلب بأكبر كمية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT channel_code , contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأظهر جميع الحساسيات وأنواعها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT allergy , allergytype FROM Allergy_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nأي نوع من الأصوات الغنائية قام الموسيقي الذي يحمل الاسم الأول سولفايج بتشغيله في الأغنية بعنوان حانة في أمستردام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"lead\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي رموز الدورات لكل صف درسه الطالب الذي يحمل اسم العائلة سميثسون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هو اسم وعنوان القسم الذي يحتوي على أكبر عدد من الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.dept_name , T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هي عناوين الأفلام التي تتضمن 'Deleted Scenes' في قسم الميزات الخاصة بها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nقائمة بجميع الخصائص للمنتج المسمى السمسم برمز النوع الدرجة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nابحث عن تفاصيل مميزة للفواتير التي تم إنشاؤها قبل تاريخ 1989-09-03 أو بعد تاريخ 2007-12-25.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nما هي أسماء الحرم الجامعية التي تمتلك أكثر عدد من الكليات في عام ٢٠٠٢ من العدد الأقصى في مقاطعة أورانج؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'country': 'CREATE TABLE \"country\" (\\n \"Country_id\" int,\\n \"Country_name\" text,\\n \"Capital\" text,\\n \"Official_native_language\" text,\\n PRIMARY KEY (\"Country_id\")\\n)', 'team': 'CREATE TABLE `team` (\\n `Team_id` int,\\n `Name` text,\\n PRIMARY KEY (`Team_id`)\\n)', 'match_season': 'CREATE TABLE \"match_season\" (\\n \"Season\" real,\\n \"Player\" text,\\n \"Position\" text,\\n \"Country\" int,\\n \"Team\" int,\\n \"Draft_Pick_Number\" int,\\n \"Draft_Class\" text,\\n \"College\" text,\\n PRIMARY KEY (\"Season\"),\\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)', 'player': 'CREATE TABLE \"player\" (\\n \"Player_ID\" int,\\n \"Player\" text,\\n \"Years_Played\" text,\\n \"Total_WL\" text,\\n \"Singles_WL\" text,\\n \"Doubles_WL\" text,\\n \"Team\" int,\\n PRIMARY KEY (\"Player_ID\"),\\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\\n)'}\n\n## User-Prompt:\nما هم جميع اللاعبين الذين لعبوا في موسم المباريات، مرتبة حسب الكلية بالترتيب الأبجدي التصاعدي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT player FROM match_season ORDER BY College ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nما هو متوسط ​​خط الطول للمحطات التي لم تكن لديها توفر للدراجات أكثر من 10؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nما هي أقصى وأدنى قيمة للسكان بين جميع البلديات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Population) FROM county\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nكم عدد البالغين الذين يقيمون في الغرفة التي قام CONRAD SELBIG بتسجيل الدخول إليها في 23 أكتوبر 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.roomName , T1.Rate , T1.CheckIn , T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nقم بتقديم تفاصيل موظفي البحث، وقم بترتيبها بترتيب تصاعدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\ncustomer_id INTEGER NOT NULL,\\ncustomer_details VARCHAR(255),\\nPRIMARY KEY (customer_id)\\n)', 'Properties': 'CREATE TABLE Properties (\\nproperty_id INTEGER NOT NULL,\\nproperty_type_code CHAR(15) NOT NULL,\\nproperty_address VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (property_id)\\n)', 'Residents': 'CREATE TABLE Residents (\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\ndate_moved_out DATETIME NOT NULL,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, property_id, date_moved_in),\\nFOREIGN KEY (property_id) REFERENCES Properties (property_id)\\n)', 'Organizations': 'CREATE TABLE Organizations (\\norganization_id INTEGER NOT NULL,\\nparent_organization_id INTEGER,\\norganization_details VARCHAR(255),\\nPRIMARY KEY (organization_id)\\n)', 'Services': 'CREATE TABLE Services (\\nservice_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (service_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Residents_Services': 'CREATE TABLE Residents_Services (\\nresident_id INTEGER NOT NULL,\\nservice_id INTEGER NOT NULL,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\ndate_requested DATETIME,\\ndate_provided DATETIME,\\nother_details VARCHAR(255),\\nPRIMARY KEY (resident_id, service_id),\\nFOREIGN KEY (service_id) REFERENCES Services (service_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Things': 'CREATE TABLE Things (\\nthing_id INTEGER NOT NULL,\\norganization_id INTEGER NOT NULL,\\nType_of_Thing_Code CHAR(15) NOT NULL,\\nservice_type_code CHAR(10) NOT NULL,\\nservice_details VARCHAR(255),\\nPRIMARY KEY (thing_id),\\nFOREIGN KEY (organization_id) REFERENCES Organizations (organization_id)\\n)', 'Customer_Events': 'CREATE TABLE Customer_Events (\\nCustomer_Event_ID INTEGER NOT NULL,\\ncustomer_id INTEGER,\\ndate_moved_in DATETIME,\\nproperty_id INTEGER,\\nresident_id INTEGER,\\nthing_id INTEGER NOT NULL,\\nPRIMARY KEY (Customer_Event_ID),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id),\\nFOREIGN KEY (customer_id) REFERENCES Customers (customer_id),\\nFOREIGN KEY (resident_id, property_id, date_moved_in) REFERENCES Residents (resident_id,property_id,date_moved_in)\\n)', 'Customer_Event_Notes': 'CREATE TABLE Customer_Event_Notes (\\nCustomer_Event_Note_ID INTEGER NOT NULL,\\nCustomer_Event_ID INTEGER NOT NULL,\\nservice_type_code CHAR(15) NOT NULL,\\nresident_id INTEGER NOT NULL,\\nproperty_id INTEGER NOT NULL,\\ndate_moved_in DATETIME NOT NULL,\\nPRIMARY KEY (Customer_Event_Note_ID),\\nFOREIGN KEY (Customer_Event_ID) REFERENCES Customer_Events (Customer_Event_ID)\\n)', 'Timed_Status_of_Things': 'CREATE TABLE Timed_Status_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Date DATETIME NOT NULL,\\nStatus_of_Thing_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Date, Status_of_Thing_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id)\\n)', 'Timed_Locations_of_Things': 'CREATE TABLE Timed_Locations_of_Things (\\nthing_id INTEGER NOT NULL,\\nDate_and_Time DATETIME NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (thing_id, Date_and_Time, Location_Code),\\nFOREIGN KEY (thing_id) REFERENCES Things (thing_id))'}\n\n## User-Prompt:\nما هي تواريخ الانتقال المميزة للسكان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nابحث عن أسماء المستندات بدون أي صور.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = \"Acknowledgement\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nكم عدد الفواتير لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Invoices\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nما هي الحد الأدنى والأقصى لعدد العضويات لجميع الفروع التي تم فتحها في عام 2011 أو تقع في لندن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT min(membership_amount) , max(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Customer_Policies': 'CREATE TABLE Customer_Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATE,\\nEnd_Date DATE,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nPRIMARY KEY (Claim_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Customer_Policies (Policy_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nCustomer_Policy_ID INTEGER NOT NULL,\\nPRIMARY KEY (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)', 'Payments': 'CREATE TABLE Payments (\\nPayment_ID INTEGER NOT NULL,\\nSettlement_ID INTEGER NOT NULL,\\nPayment_Method_Code VARCHAR(255),\\nDate_Payment_Made DATE,\\nAmount_Payment INTEGER,\\nPRIMARY KEY (Payment_ID),\\nFOREIGN KEY (Settlement_ID) REFERENCES Settlements (Settlement_ID)\\n)'}\n\n## User-Prompt:\nقدم لي تاريخ المطالبة وتاريخ التسوية لجميع المطالبات التي يكون مبلغها المطلوب أكبر من المتوسط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'repair': 'CREATE TABLE \"repair\" (\\n\"repair_ID\" int,\\n\"name\" text,\\n\"Launch_Date\" text,\\n\"Notes\" text,\\nPRIMARY KEY (\"repair_ID\")\\n)', 'machine': 'CREATE TABLE \"machine\" (\\n\"Machine_ID\" int,\\n\"Making_Year\" int,\\n\"Class\" text,\\n\"Team\" text,\\n\"Machine_series\" text,\\n\"value_points\" real,\\n\"quality_rank\" int,\\nPRIMARY KEY (\"Machine_ID\")\\n)', 'technician': 'CREATE TABLE \"technician\" (\\n\"technician_id\" real,\\n\"Name\" text,\\n\"Team\" text,\\n\"Starting_Year\" real,\\n\"Age\" int,\\nPRIMARY Key (\"technician_id\")\\n)', 'repair_assignment': 'CREATE TABLE \"repair_assignment\" (\\n\"technician_id\" int,\\n\"repair_ID\" int,\\n\"Machine_ID\" int,\\nPRIMARY Key (\"technician_id\",\"repair_ID\",\"Machine_ID\"),\\nFOREIGN KEY (`technician_id`) REFERENCES `technician`(`technician_id`),\\nFOREIGN KEY (`repair_ID`) REFERENCES `repair`(`repair_ID`),\\nFOREIGN KEY (`Machine_ID`) REFERENCES `machine`(`Machine_ID`)\\n)'}\n\n## User-Prompt:\nما هو الفريق وسنة البدء لكل فني؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Team , Starting_Year FROM technician\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nما هو اسم المشروع الذي يمتلك أعلى عدد من الساعات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM projects ORDER BY hours DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Rank_in_series\" int,\\n\"Number_in_season\" int,\\n\"Title\" text,\\n\"Directed_by\" text,\\n\"Original_air_date\" text,\\n\"Production_code\" text,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'cinema': 'CREATE TABLE \"cinema\" (\\n\"Cinema_ID\" int,\\n\"Name\" text,\\n\"Openning_year\" int,\\n\"Capacity\" int,\\n\"Location\" text,\\nPRIMARY KEY (\"Cinema_ID\"))', 'schedule': 'CREATE TABLE \"schedule\" (\\n\"Cinema_ID\" int,\\n\"Film_ID\" int,\\n\"Date\" text,\\n\"Show_times_per_day\" int,\\n\"Price\" float,\\nPRIMARY KEY (\"Cinema_ID\",\"Film_ID\"),\\nFOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),\\nFOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)\\n)'}\n\n## User-Prompt:\nأظهر اسم السينما، وعنوان الفيلم، والتاريخ، والسعر لكل سجل في الجدول الزمني.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.name , T2.title , T1.date , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nارجع جميع المعلومات لكل سجل انتخابي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT * FROM election\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nما هي العنب، والمزارع، والسنوات لأنواع النبيذ التي يكون سعرها أعلى من 100، مرتبة حسب السنة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nما هو الاسم والراتب لجميع الموظفين مرتبة حسب الراتب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name , salary FROM Employee ORDER BY salary\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nالعثور على اسم العائلة للطالبات الإناث (الجنس هو F) بترتيب تنازلي حسب العمر.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Fname FROM STUDENT ORDER BY Age DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Problem_Category_Codes': 'CREATE TABLE `Problem_Category_Codes` (\\n`problem_category_code` VARCHAR(20) PRIMARY KEY,\\n`problem_category_description` VARCHAR(80)\\n)', 'Problem_Log': 'CREATE TABLE `Problem_Log` (\\n`problem_log_id` INTEGER PRIMARY KEY,\\n`assigned_to_staff_id` INTEGER NOT NULL,\\n`problem_id` INTEGER NOT NULL,\\n`problem_category_code` VARCHAR(20) NOT NULL,\\n`problem_status_code` VARCHAR(20) NOT NULL,\\n`log_entry_date` DATETIME,\\n`log_entry_description` VARCHAR(255),\\n`log_entry_fix` VARCHAR(255),\\n`other_log_details` VARCHAR(255),\\nFOREIGN KEY (`problem_category_code` ) REFERENCES `Problem_Category_Codes`(`problem_category_code` ),FOREIGN KEY (`assigned_to_staff_id` ) REFERENCES `Staff`(`staff_id` ),FOREIGN KEY (`problem_id` ) REFERENCES `Problems`(`problem_id` ),FOREIGN KEY (`problem_status_code` ) REFERENCES `Problem_Status_Codes`(`problem_status_code` )\\n)', 'Problem_Status_Codes': 'CREATE TABLE `Problem_Status_Codes` (\\n`problem_status_code` VARCHAR(20) PRIMARY KEY,\\n`problem_status_description` VARCHAR(80)\\n)', 'Product': 'CREATE TABLE `Product` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_first_name` VARCHAR(80),\\n`staff_last_name` VARCHAR(80),\\n`other_staff_details` VARCHAR(255)\\n)', 'Problems': 'CREATE TABLE `Problems` (\\n`problem_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`closure_authorised_by_staff_id` INTEGER NOT NULL,\\n`reported_by_staff_id` INTEGER NOT NULL,\\n`date_problem_reported` DATETIME NOT NULL,\\n`date_problem_closed` DATETIME,\\n`problem_description` VARCHAR(255),\\n`other_problem_details` VARCHAR(255),\\nFOREIGN KEY (`closure_authorised_by_staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Product`(`product_id` ),\\nFOREIGN KEY (`reported_by_staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هي معرّفات المشاكل التي تم الإبلاغ عنها قبل تاريخ 1978-06-26؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT problem_id FROM problems WHERE date_problem_reported > \"1978-06-26\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'program': 'CREATE TABLE \"program\" (\\n\"Program_ID\" int,\\n\"Name\" text,\\n\"Origin\" text,\\n\"Launch\" real,\\n\"Owner\" text,\\nPRIMARY KEY (\"Program_ID\")\\n)', 'channel': 'CREATE TABLE \"channel\" (\\n\"Channel_ID\" int,\\n\"Name\" text,\\n\"Owner\" text,\\n\"Share_in_percent\" real,\\n\"Rating_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\")\\n)', 'broadcast': 'CREATE TABLE \"broadcast\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Time_of_day\" text,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)', 'broadcast_share': 'CREATE TABLE \"broadcast_share\" (\\n\"Channel_ID\" int,\\n\"Program_ID\" int,\\n\"Date\" text,\\n\"Share_in_percent\" real,\\nPRIMARY KEY (\"Channel_ID\",\"Program_ID\"),\\nFOREIGN KEY (`Channel_ID`) REFERENCES `channel`(`Channel_ID`),\\nFOREIGN KEY (`Program_ID`) REFERENCES `program`(`Program_ID`)\\n)'}\n\n## User-Prompt:\nعدد مالكي القنوات المتميزة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT OWNER) FROM channel\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي الولاية والتسجيل في الكليات التي لديها أي طلاب تم قبولهم في قرار التجربة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nأي قسم يقدم أكبر عدد من الوحدات الدراسية بشكل عام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي جميع الأغاني التي تم إنتاجها بواسطة الفنانين الذين يحملون الاسم الأول ماريان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = \"Flash\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nماهى محطة البداية ومحطة النهاية للرحلات ذات أقدم ثلاثة أرقام تعريفية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي أرقام تعريفية الطلاب الذين قاموا بتسجيل دورات أو حضورها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على معرّف المدرسين الذين لم يدروسوا أي دورات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT id FROM instructor EXCEPT SELECT id FROM teaches\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nما هو رقم معرف سجل المشكلة الذي تم إنشاؤه مؤخرًا بشكل أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT code , name , min(price) FROM products GROUP BY name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هم المستثمرون الذين قاموا بالاستثمار في رواد الأعمال اللذين طلبوا أكثر من 140000 ورواد الأعمال اللذين طلبوا أقل من 120000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nأظهر الاسم والتاريخ لكل سباق واسم مضماره.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'company': 'CREATE TABLE \"company\" (\\n\"Company_ID\" int,\\n\"Rank\" int,\\n\"Company\" text,\\n\"Headquarters\" text,\\n\"Main_Industry\" text,\\n\"Sales_billion\" real,\\n\"Profits_billion\" real,\\n\"Assets_billion\" real,\\n\"Market_Value\" real,\\nPRIMARY KEY (\"Company_ID\")\\n)', 'gas_station': 'CREATE TABLE \"gas_station\" (\\n\"Station_ID\" int,\\n\"Open_Year\" int,\\n\"Location\" text,\\n\"Manager_Name\" text,\\n\"Vice_Manager_Name\" text,\\n\"Representative_Name\" text,\\nPRIMARY KEY (\"Station_ID\")\\n)', 'station_company': 'CREATE TABLE \"station_company\" (\\n\"Station_ID\" int,\\n\"Company_ID\" int,\\n\"Rank_of_the_Year\" int,\\nPRIMARY KEY (\"Station_ID\",\"Company_ID\"),\\nFOREIGN KEY (`Station_ID`) REFERENCES `gas_station`(`Station_ID`),\\nFOREIGN KEY (`Company_ID`) REFERENCES `company`(`Company_ID`)\\n)'}\n\n## User-Prompt:\nما هي القيمة السوقية الدنيا والقصوى والمتوسطة لجميع الشركات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT min(market_value) , max(market_value) , avg(market_value) FROM company\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Rooms': 'CREATE TABLE \"Rooms\" ( \\n\\t\"RoomId\" TEXT PRIMARY KEY,\\n\\t\"roomName\" TEXT, \\n\\t\"beds\" INTEGER, \\n\\t\"bedType\" TEXT, \\n\\t\"maxOccupancy\" INTEGER, \\n\\t\"basePrice\" INTEGER, \\n\\t\"decor\" TEXT\\n\\n)', 'Reservations': 'CREATE TABLE \"Reservations\" ( \\n\\t\"Code\" INTEGER PRIMARY KEY, \\n\\t\"Room\" TEXT, \\n\\t\"CheckIn\" TEXT, \\n\\t\"CheckOut\" TEXT, \\n\\t\"Rate\" REAL, \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Adults\" INTEGER, \\n\\t\"Kids\" INTEGER,\\n\\tFOREIGN KEY (Room) REFERENCES Rooms(RoomId)\\n)'}\n\n## User-Prompt:\nأي غرفة لديها أعلى سعر أساسي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nابحث عن الأسماء المميزة لجميع أنواع النبيذ التي تتمتع بأسعار أعلى من بعض أنواع النبيذ من مزرعة جون أنتوني.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Club': 'CREATE TABLE Club (\\n ClubID INTEGER PRIMARY KEY,\\n ClubName VARCHAR(40),\\n ClubDesc VARCHAR(1024),\\n ClubLocation VARCHAR(40)\\n)', 'Member_of_club': 'CREATE TABLE Member_of_club (\\n StuID INTEGER,\\n ClubID INTEGER,\\n Position VARCHAR(40),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ClubID) REFERENCES Club(ClubID)\\n)'}\n\n## User-Prompt:\nمن هو CTO لنادي Hopkins Student Enterprises؟ أظهر الاسم الأول واللقب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t2.position = \"President\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء المستخدمين الذين ليس لديهم سجل في أول إشعار عن الخسارة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي جميع المعلومات المتعلقة بالموظفين الذين يعملون كمدراء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artist': 'CREATE TABLE \"artist\" (\\n\"Artist_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Year_Join\" int,\\n\"Age\" int,\\nPRIMARY KEY (\"Artist_ID\")\\n)', 'exhibition': 'CREATE TABLE \"exhibition\" (\\n\"Exhibition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Artist_ID\" int,\\n\"Ticket_Price\" real,\\nPRIMARY KEY (\"Exhibition_ID\"),\\nFOREIGN KEY (`Artist_ID`) REFERENCES `artist`(`Artist_ID`)\\n)', 'exhibition_record': 'CREATE TABLE \"exhibition_record\" (\\n\"Exhibition_ID\" int,\\n\"Date\" text,\\n\"Attendance\" int,\\nPRIMARY KEY (\"Exhibition_ID\",\"Date\"),\\nFOREIGN KEY (`Exhibition_ID`) REFERENCES `exhibition`(`Exhibition_ID`)\\n)'}\n\n## User-Prompt:\nاعرض أسماء الفنانين ومواضيع معارضهم التي كان سعر تذكرتها أعلى من المتوسط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nابحث عن تاريخ التسجيل في الدورة Spanish.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"Spanish\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'region': 'CREATE TABLE \"region\" (\\n\"Region_ID\" int,\\n\"Region_name\" text,\\n\"Date\" text,\\n\"Label\" text,\\n\"Format\" text,\\n\"Catalogue\" text,\\nPRIMARY KEY (\"Region_ID\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Minister\" text,\\n\"Took_office\" text,\\n\"Left_office\" text,\\n\"Region_ID\" int,\\n\"Party_name\" text,\\nPRIMARY KEY (\"Party_ID\"),\\nFOREIGN KEY (`Region_ID`) REFERENCES `region`(`Region_ID`)\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Member_Name\" text,\\n\"Party_ID\" text,\\n\"In_office\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`)\\n)', 'party_events': 'CREATE TABLE \"party_events\" (\\n\"Event_ID\" int,\\n\"Event_Name\" text,\\n\"Party_ID\" int,\\n\"Member_in_charge_ID\" int,\\nPRIMARY KEY (\"Event_ID\"),\\nFOREIGN KEY (`Party_ID`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`Member_in_charge_ID`) REFERENCES `member`(`Member_ID`)\\n)'}\n\n## User-Prompt:\nمن هم الوزراء الذين تولوا المنصب بعد عام 1961 أو قبل عام 1959؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأي رمز لنوع الشقة يظهر الأكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء رواد الأعمال ومستثمروهم المقابلين، مرتبة تنازلياً حسب المبلغ المطلوب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nما هي الأنواع المختلفة للمعاملات، وكم عدد كل منها من المعاملات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Party_Theme\" text,\\n\"Location\" text,\\n\"First_year\" text,\\n\"Last_year\" text,\\n\"Number_of_hosts\" int,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'host': 'CREATE TABLE \"host\" (\\n\"Host_ID\" int,\\n\"Name\" text,\\n\"Nationality\" text,\\n\"Age\" text,\\nPRIMARY KEY (\"Host_ID\")\\n)', 'party_host': 'CREATE TABLE \"party_host\" (\\n\"Party_ID\" int,\\n\"Host_ID\" int,\\n\"Is_Main_in_Charge\" bool,\\nPRIMARY KEY (\"Party_ID\",\"Host_ID\"),\\nFOREIGN KEY (\"Host_ID\") REFERENCES `host`(\"Host_ID\"),\\nFOREIGN KEY (\"Party_ID\") REFERENCES `party`(\"Party_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء المضيفين للحفلات التي يتجاوز عدد المضيفين فيها العدد 20.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nأظهر جميع الرتب الأكاديمية وعدد الطلاب الذين يتلقون إرشادًا من كل رتبة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هي أسماء الخصائص لمنتج 'السمسم' التي لها رمز نوع الخاصية 'الدرجة'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي تواريخ ميلاد رواد الأعمال الذين لديهم مستثمرون Simon Woodroffe أو Peter Jones؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nكم عدد المعاملات لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Financial_transactions\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هي الأسماء الكاملة والأعمار لجميع الطالبات اللواتي يكون جنسهن أنثى؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nاذكر جميع أسماء المواضيع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%son%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Inst': 'CREATE TABLE Inst (\\n instID INTEGER,\\n name TEXT,\\n country TEXT, -- the home country of the institution (this is obviously an impoverished model)\\n PRIMARY KEY (instID)\\n)', 'Authors': 'CREATE TABLE Authors (\\n authID INTEGER,\\n lname TEXT,\\n fname TEXT,\\n PRIMARY KEY (authID)\\n)', 'Papers': 'CREATE TABLE Papers (\\n paperID INTEGER,\\n title TEXT,\\n PRIMARY KEY (paperID)\\n)', 'Authorship': 'CREATE TABLE Authorship (\\n authID INTEGER,\\n instID INTEGER,\\n paperID INTEGER,\\n authOrder INTEGER,\\n PRIMARY KEY (authID, instID, paperID),\\n FOREIGN KEY (authID) REFERENCES Authors (authID),\\n FOREIGN KEY (instID) REFERENCES Inst (instID),\\n FOREIGN KEY (paperID) REFERENCES Papers (paperID)\\n)'}\n\n## User-Prompt:\nإلى أي مؤسسة ينتمي المؤلف ماتياس بلوم؟ أعطني اسم المؤسسة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'railway': 'CREATE TABLE \"railway\" (\\n\"Railway_ID\" int,\\n\"Railway\" text,\\n\"Builder\" text,\\n\"Built\" text,\\n\"Wheels\" text,\\n\"Location\" text,\\n\"ObjectNumber\" text,\\nPRIMARY KEY (\"Railway_ID\")\\n)', 'train': 'CREATE TABLE \"train\" (\\n\"Train_ID\" int,\\n\"Train_Num\" text,\\n\"Name\" text,\\n\"From\" text,\\n\"Arrival\" text,\\n\"Railway_ID\" int,\\nPRIMARY KEY (\"Train_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES `railway`(\"Railway_ID\")\\n)', 'manager': 'CREATE TABLE \"manager\" (\\n\"Manager_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Working_year_starts\" text,\\n\"Age\" int,\\n\"Level\" int,\\nPRIMARY KEY (\"Manager_ID\")\\n)', 'railway_manage': 'CREATE TABLE \"railway_manage\" (\\n\"Railway_ID\" int,\\n\"Manager_ID\" int,\\n\"From_Year\" text,\\nPRIMARY KEY (\"Railway_ID\",\"Manager_ID\"),\\nFOREIGN KEY (\"Manager_ID\") REFERENCES \"manager\"(\"Manager_ID\"),\\nFOREIGN KEY (\"Railway_ID\") REFERENCES \"railway\"(\"Railway_ID\")\\n)'}\n\n## User-Prompt:\nأظهر المواقع المختلفة للسكك الحديدية جنبًا إلى جنب مع عدد السكك الحديدية في كل موقع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Roles': 'CREATE TABLE `Roles` (\\n`role_code` VARCHAR(15) PRIMARY KEY,\\n`role_description` VARCHAR(80)\\n)', 'Users': 'CREATE TABLE `Users` (\\n`user_id` INTEGER PRIMARY KEY,\\n`role_code` VARCHAR(15) NOT NULL,\\n`user_name` VARCHAR(40),\\n`user_login` VARCHAR(40),\\n`password` VARCHAR(40),\\nFOREIGN KEY (`role_code` ) REFERENCES `Roles`(`role_code` )\\n)', 'Document_Structures': 'CREATE TABLE `Document_Structures` (\\n`document_structure_code` VARCHAR(15) PRIMARY KEY,\\n`parent_document_structure_code` VARCHAR(15),\\n`document_structure_description` VARCHAR(80)\\n)', 'Functional_Areas': 'CREATE TABLE `Functional_Areas` (\\n`functional_area_code` VARCHAR(15) PRIMARY KEY,\\n`parent_functional_area_code` VARCHAR(15),\\n`functional_area_description` VARCHAR(80) NOT NULL\\n)', 'Images': 'CREATE TABLE `Images` (\\n`image_id` INTEGER PRIMARY KEY,\\n`image_alt_text` VARCHAR(80),\\n`image_name` VARCHAR(40),\\n`image_url` VARCHAR(255)\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_code` VARCHAR(15) PRIMARY KEY,\\n`document_structure_code` VARCHAR(15) NOT NULL,\\n`document_type_code` VARCHAR(15) NOT NULL,\\n`access_count` INTEGER,\\n`document_name` VARCHAR(80),\\nFOREIGN KEY (`document_structure_code` ) REFERENCES `Document_Structures`(`document_structure_code` )\\n)', 'Document_Functional_Areas': 'CREATE TABLE `Document_Functional_Areas` (\\n`document_code` VARCHAR(15) NOT NULL,\\n`functional_area_code` VARCHAR(15) NOT NULL,\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` ),\\nFOREIGN KEY (`functional_area_code` ) REFERENCES `Functional_Areas`(`functional_area_code` )\\n)', 'Document_Sections': 'CREATE TABLE `Document_Sections` (\\n`section_id` INTEGER PRIMARY KEY,\\n`document_code` VARCHAR(15) NOT NULL,\\n`section_sequence` INTEGER,\\n`section_code` VARCHAR(20),\\n`section_title` VARCHAR(80),\\nFOREIGN KEY (`document_code` ) REFERENCES `Documents`(`document_code` )\\n)', 'Document_Sections_Images': 'CREATE TABLE `Document_Sections_Images` (\\n`section_id` INTEGER NOT NULL,\\n`image_id` INTEGER NOT NULL,\\nPRIMARY KEY (`section_id`,`image_id`),\\nFOREIGN KEY (`section_id` ) REFERENCES `Document_Sections`(`section_id` ),\\nFOREIGN KEY (`image_id` ) REFERENCES `Images`(`image_id` )\\n)'}\n\n## User-Prompt:\nما هي هيكلية المستند الذي تم الوصول إليه بأقل عدد من المرات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(access_count) FROM documents\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'college': 'CREATE TABLE \"college\" (\\n\"College_ID\" int,\\n\"Name\" text,\\n\"Leader_Name\" text,\\n\"College_Location\" text,\\nPRIMARY KEY (\"College_ID\")\\n)', 'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"College_ID\" int,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"College_ID\") REFERENCES `college`(\"College_ID\")\\n)', 'round': 'CREATE TABLE \"round\" (\\n\"Round_ID\" int,\\n\"Member_ID\" int,\\n\"Decoration_Theme\" text,\\n\"Rank_in_Round\" int,\\nPRIMARY KEY (\"Member_ID\",\"Round_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\")\\n)'}\n\n## User-Prompt:\nأظهر أسماء القادة المميزة للكليات المرتبطة بأعضاء من بلد كندا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nما هو معرف الطالب الذي يتوافق مع أكبر طالب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nقائمة بعناوين كل الألبومات مرتبة حسب عنوان الألبوم بترتيب تصاعدي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM albums ORDER BY title;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي الأسماء ونقاط الائتمان المختلفة للعملاء الذين قاموا بأخذ قرض؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.cust_name , T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county': 'CREATE TABLE \"county\" (\\n\"County_Id\" int,\\n\"County_name\" text,\\n\"Population\" real,\\n\"Zip_code\" text,\\nPRIMARY KEY (\"County_Id\")\\n)', 'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Year\" real,\\n\"Party\" text,\\n\"Governor\" text,\\n\"Lieutenant_Governor\" text,\\n\"Comptroller\" text,\\n\"Attorney_General\" text,\\n\"US_Senate\" text,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'election': 'CREATE TABLE \"election\" (\\n\"Election_ID\" int,\\n\"Counties_Represented\" text,\\n\"District\" int,\\n\"Delegate\" text,\\n\"Party\" int,\\n\"First_Elected\" real,\\n\"Committee\" text,\\nPRIMARY KEY (\"Election_ID\"),\\nFOREIGN KEY (`Party`) REFERENCES `party`(`Party_ID`),\\nFOREIGN KEY (`District`) REFERENCES `county`(`County_Id`)\\n)'}\n\n## User-Prompt:\nأظهر المندوبين وأسماء الأحزاب التي ينتمون إليها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = \"Appropriations\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nأظهر عدد المدن في المقاطعات التي يبلغ تعداد سكانها أكثر من 20000.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر أرقام الشقق المتميزة للشقق التي لديها حجوزات برمز حالة تأكيد.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'journal': 'CREATE TABLE \"journal\" (\\n\"Journal_ID\" int,\\n\"Date\" text,\\n\"Theme\" text,\\n\"Sales\" int,\\nPRIMARY KEY (\"Journal_ID\")\\n)', 'editor': 'CREATE TABLE \"editor\" (\\n\"Editor_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\nPRIMARY KEY (\"Editor_ID\")\\n)', 'journal_committee': 'CREATE TABLE \"journal_committee\" (\\n\"Editor_ID\" int,\\n\"Journal_ID\" int,\\n\"Work_Type\" text,\\nPRIMARY KEY (\"Editor_ID\",\"Journal_ID\"),\\nFOREIGN KEY (\"Editor_ID\") REFERENCES `editor`(\"Editor_ID\"),\\nFOREIGN KEY (\"Journal_ID\") REFERENCES `journal`(\"Journal_ID\")\\n)'}\n\n## User-Prompt:\nاعرض التاريخ والموضوع والمبيعات للمجلة التي لم تكن بها أيًا من المحررين المدرجة يخدمون في اللجنة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nأذكر أسماء الجبال التي لا يوجد لها أي متسلق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nلكل فريق، أرجو إعادة اسم الفريق والهوية وأعلى راتب في الفريق.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nكم عدد الأعضاء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name != 'Alice'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Video_Games': 'CREATE TABLE Video_Games (\\n GameID INTEGER PRIMARY KEY,\\n GName VARCHAR(40),\\n GType VARCHAR(40)\\n)', 'Plays_Games': 'CREATE TABLE Plays_Games (\\n StuID INTEGER,\\n GameID INTEGER,\\n Hours_Played INTEGER,\\n FOREIGN KEY(GameID) REFERENCES Video_Games(GameID),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)', 'SportsInfo': 'CREATE TABLE SportsInfo (\\n StuID INTEGER,\\n SportName VARCHAR(32),\\n HoursPerWeek INTEGER,\\n GamesPlayed INTEGER,\\n OnScholarship VARCHAR(1),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nالعثور على الاسم الأخير والاسم الأول للطلاب الذين يلعبون كرة القدم أو لاكروس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = \"Smith\" AND T3.Fname = \"Linda\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Is_Male\" text,\\n\"Age\" int,\\nPRIMARY KEY (\"People_ID\")\\n)', 'church': 'CREATE TABLE \"church\" (\\n\"Church_ID\" int,\\n\"Name\" text,\\n\"Organized_by\" text,\\n\"Open_Date\" int,\\n\"Continuation_of\" text,\\nPRIMARY KEY (\"Church_ID\")\\n)', 'wedding': 'CREATE TABLE \"wedding\" (\\n\"Church_ID\" int,\\n\"Male_ID\" int,\\n\"Female_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Church_ID\",\"Male_ID\",\"Female_ID\"),\\nFOREIGN KEY (\"Church_ID\") REFERENCES `church`(\"Church_ID\"),\\nFOREIGN KEY (\"Male_ID\") REFERENCES `people`(\"People_ID\"),\\nFOREIGN KEY (\"Female_ID\") REFERENCES `people`(\"People_ID\")\\n)'}\n\n## User-Prompt:\nكم عدد حفلات الزفاف في عام 2016؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM wedding WHERE YEAR = 2016\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع العلماء مرتبة ترتيباً أبجدياً؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM scientists ORDER BY name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على أسماء جميع المدرسين في قسم علوم الحاسوب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nابحث عن جميع نتائج سباق 200 متر و 300 متر للسباحين من جنسية أستراليا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT nationality , count(*) FROM swimmer GROUP BY nationality HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'mountain': 'CREATE TABLE \"mountain\" (\\n\"Mountain_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Prominence\" real,\\n\"Range\" text,\\n\"Country\" text,\\nPRIMARY KEY (\"Mountain_ID\")\\n)', 'climber': 'CREATE TABLE \"climber\" (\\n\"Climber_ID\" int,\\n\"Name\" text,\\n\"Country\" text,\\n\"Time\" text,\\n\"Points\" real,\\n\"Mountain_ID\" int,\\nPRIMARY KEY (\"Climber_ID\"),\\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء الجبال التي يبلغ ارتفاعها أكثر من 5000 أو يزيد بروزها عن 1000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nما هي أنواع الأصوات الغنائية المستخدمة في الأغنية لو بوب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = \"Heilo\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nهل يمكنك العثور على اسم العالِم الذي عمل على مشروعين يحملان الأسماء Matter of Time و A Puzzling Parallax؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM projects WHERE hours BETWEEN 100 AND 300\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nاذكر عناوين جميع مؤلفي أو معلمي الدورات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name\t = \"Cathrine\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nما هو تاريخ ميلاد عضو الفريق الذي يحمل الاسم جانيسا ساوين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي أنواع مواقع اللاعبين الفريدة في التجربة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT cName) FROM tryout\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`town_city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Services': 'CREATE TABLE `Services` (\\n`service_id` INTEGER PRIMARY KEY,\\n`service_type_code` VARCHAR(15) NOT NULL,\\n`service_name` VARCHAR(80),\\n`service_descriptio` VARCHAR(255)\\n)', 'Forms': 'CREATE TABLE `Forms` (\\n`form_id` INTEGER PRIMARY KEY,\\n`form_type_code` VARCHAR(15) NOT NULL,\\n`service_id` INTEGER,\\n`form_number` VARCHAR(50),\\n`form_name` VARCHAR(80),\\n`form_description` VARCHAR(255),\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` )\\n)', 'Individuals': 'CREATE TABLE `Individuals` (\\n`individual_id` INTEGER PRIMARY KEY,\\n`individual_first_name` VARCHAR(80),\\n`individual_middle_name` VARCHAR(80),\\n`inidividual_phone` VARCHAR(80),\\n`individual_email` VARCHAR(80),\\n`individual_address` VARCHAR(255),\\n`individual_last_name` VARCHAR(80)\\n)', 'Organizations': 'CREATE TABLE `Organizations` (\\n`organization_id` INTEGER PRIMARY KEY,\\n`date_formed` DATETIME,\\n`organization_name` VARCHAR(255),\\n`uk_vat_number` VARCHAR(20)\\n)', 'Parties': 'CREATE TABLE `Parties` (\\n`party_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15) NOT NULL,\\n`party_phone` VARCHAR(80),\\n`party_email` VARCHAR(80)\\n)', 'Organization_Contact_Individuals': 'CREATE TABLE `Organization_Contact_Individuals` (\\n`individual_id` INTEGER NOT NULL,\\n`organization_id` INTEGER NOT NULL,\\n`date_contact_from` DATETIME NOT NULL,\\n`date_contact_to` DATETIME,\\nPRIMARY KEY (`individual_id`,`organization_id` ),\\nFOREIGN KEY (`organization_id` ) REFERENCES `Organizations`(`organization_id` ),\\nFOREIGN KEY (`individual_id` ) REFERENCES `Individuals`(`individual_id` )\\n)', 'Party_Addresses': 'CREATE TABLE `Party_Addresses` (\\n`party_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nPRIMARY KEY (`party_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` )\\n)', 'Party_Forms': 'CREATE TABLE `Party_Forms` (\\n`party_id` INTEGER NOT NULL,\\n`form_id` INTEGER NOT NULL,\\n`date_completion_started` DATETIME NOT NULL,\\n`form_status_code` VARCHAR(15) NOT NULL,\\n`date_fully_completed` DATETIME,\\nPRIMARY KEY (`party_id`, `form_id`),\\nFOREIGN KEY (`party_id` ) REFERENCES `Parties`(`party_id` ),\\nFOREIGN KEY (`form_id` ) REFERENCES `Forms`(`form_id` )\\n)', 'Party_Services': 'CREATE TABLE `Party_Services` (\\n`booking_id` INTEGER NOT NULL ,\\n`customer_id` INTEGER NOT NULL,\\n`service_id` INTEGER NOT NULL,\\n`service_datetime` DATETIME NOT NULL,\\n`booking_made_date` DATETIME,\\nFOREIGN KEY (`service_id` ) REFERENCES `Services`(`service_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Parties`(`party_id` )\\n)'}\n\n## User-Prompt:\nالبحث عن الأسماء الأخيرة للأفراد الذين كانوا أفراد اتصال لمنظمة ما.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'College': 'CREATE TABLE College \\n ( cName \\tvarchar(20) NOT NULL,\\n state \\tvarchar(2),\\n enr \\tnumeric(5,0),\\n PRIMARY KEY (cName)\\n )', 'Player': 'CREATE TABLE Player\\n ( pID\\t\\t\\tnumeric(5,0) NOT NULL,\\n \\tpName \\tvarchar(20),\\n yCard \\tvarchar(3),\\n HS \\tnumeric(5,0),\\n PRIMARY KEY (pID)\\n )', 'Tryout': 'CREATE TABLE Tryout\\n ( pID\\t\\t\\tnumeric(5,0),\\n \\tcName \\tvarchar(20),\\n pPos \\tvarchar(8),\\n decision varchar(3),\\n PRIMARY KEY (pID, cName),\\n FOREIGN KEY (pID) REFERENCES Player(pID),\\n FOREIGN KEY (cName) REFERENCES College(cName)\\n )'}\n\n## User-Prompt:\nما هي الولايات المختلفة التي شهدت نجاح طلاب يخوضون التجربة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nابحث عن عناوين البريد الإلكتروني وأرقام الهواتف للزبائن الذين لم يقدموا شكوى من قبل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nالعودة إلى رمز الفئة والسعر المعتاد لـ 'الكمون'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product_category_code , typical_buying_price FROM products WHERE product_name = \"cumin\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'medicine': 'CREATE TABLE \"medicine\" (\\n\"id\" int,\\n\"name\" text,\\n\"Trade_Name\" text,\\n\"FDA_approved\" text,\\nprimary key (\"id\")\\n)', 'enzyme': 'CREATE TABLE \"enzyme\" (\\n\"id\" int,\\n\"name\" text,\\n\"Location\" text,\\n\"Product\" text,\\n\"Chromosome\" text,\\n\"OMIM\" int,\\n\"Porphyria\" text,\\nprimary key (\"id\")\\n)', 'medicine_enzyme_interaction': 'CREATE TABLE \"medicine_enzyme_interaction\" (\\n\"enzyme_id\" int,\\n\"medicine_id\" int,\\n\"interaction_type\" text,\\nprimary key (\"enzyme_id\", \"medicine_id\"),\\nforeign key (\"enzyme_id\") references `enzyme`(\"id\"),\\nforeign key (\"medicine_id\") references `medicine`(\"id\")\\n)'}\n\n## User-Prompt:\nأي أسماء الإنزيمات تحتوي على الجزء ALA؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM enzyme WHERE name LIKE \"%ALA%\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nقائمة جميع وسائل الدفع وعدد المدفوعات باستخدام كل وسيلة دفع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'routes': 'CREATE TABLE routes (\\n rid integer PRIMARY KEY,\\n dst_apid integer, -- Id of destination airport\\n dst_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the destination airport\\n src_apid bigint, -- Id of source airport\\n src_ap varchar(4), -- 3-letter (IATA) or 4-letter (ICAO) code of the source airport\\n alid bigint, -- Id of airline\\n airline varchar(4), -- 2-letter (IATA) or 3-letter (ICAO) code of the airline\\n codeshare text, -- \"Y\" if this flight is a codeshare (that is, not operated by \\n -- Airline, but another carrier), empty otherwise\\n FOREIGN KEY(dst_apid) REFERENCES airports(apid),\\n FOREIGN KEY(src_apid) REFERENCES airports(apid),\\n FOREIGN KEY(alid) REFERENCES airlines(alid)\\n)', 'airports': 'CREATE TABLE airports (\\n apid integer PRIMARY KEY, -- Id of the airport\\n name text NOT NULL, -- Name of airport\\n city text, -- Main city served by airport\\n country text, -- Country or territory where airport is located\\n x real, -- Latitude of airport: Decimal degrees, usually to six\\n -- significant digits. Negative is South, positive is North\\n y real, -- Longitude of airport: Decimal degrees, usually to six \\n -- significant digits. Negative is West, positive is East\\n elevation bigint, -- Altitude of airport measured in feets\\n iata character varchar(3), -- 3-letter IATA code. empty or null if not assigned/unknown\\n icao character varchar(4) -- 4-letter ICAO code. empty or null if not assigned\\n \\n)', 'airlines': 'CREATE TABLE airlines (\\n alid integer PRIMARY KEY, -- Id of the airline\\n name text, -- Name of the airline\\n iata varchar(2), -- 2-letter IATA code. empty or null if not assigned/unknown \\n icao varchar(3), -- 3-letter ICAO code. empty or null if not assigned\\n callsign text, -- Airline callsign\\n country text, -- Country or territory where airline is incorporated\\n active varchar(2) -- \"Y\" if the airline is or has until recently been operational,\\n)'}\n\n## User-Prompt:\nما هو اسم شركة الطيران التي تدير أكبر عدد من الطرق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي مدة الأغنية وحجم الملف وتنسيق الأغنية لكل أغنية بوب، مرتبة حسب العنوان أبجديًا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\" ORDER BY T2.song_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nابحث عن أسماء الخدمات التي يحتوي عليها مسكن Smith Hall مرتبة حسب أسماء الخدمات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nكم عدد أعضاء المشروع الذين عملوا كقادة أو بدأوا العمل قبل '1989-04-24 23:51:54'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Restaurant': 'CREATE TABLE Restaurant (\\n ResID INTEGER PRIMARY KEY,\\n ResName VARCHAR(100),\\n Address VARCHAR(100),\\n Rating INTEGER\\n)', 'Type_Of_Restaurant': 'CREATE TABLE Type_Of_Restaurant (\\n ResID INTEGER,\\n ResTypeID INTEGER,\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID),\\n FOREIGN KEY(ResTypeID) REFERENCES Restaurant_Type(ResTypeID)\\n)', 'Restaurant_Type': 'CREATE TABLE Restaurant_Type (\\n ResTypeID INTEGER PRIMARY KEY,\\n ResTypeName VARCHAR(40),\\n ResTypeDescription VARCHAR(100)\\n)', 'Visits_Restaurant': 'CREATE TABLE Visits_Restaurant (\\n StuID INTEGER,\\n ResID INTEGER,\\n Time TIMESTAMP,\\n Spent FLOAT,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID)\\n)'}\n\n## User-Prompt:\nأي تخصص يحتوي على بين 2 و 30 عدد من الطلاب؟ أذكر التخصص وعدد الطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Major , count(*) FROM Student GROUP BY Major ORDER BY count(Major) ASC LIMIT 1;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nما هو العنوان للعميل الذي يحمل الرقم 10؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'musical': 'CREATE TABLE \"musical\" (\\n\"Musical_ID\" int,\\n\"Name\" text,\\n\"Year\" int,\\n\"Award\" text,\\n\"Category\" text,\\n\"Nominee\" text,\\n\"Result\" text,\\nPRIMARY KEY (\"Musical_ID\")\\n)', 'actor': 'CREATE TABLE \"actor\" (\\n\"Actor_ID\" int,\\n\"Name\" text,\\n\"Musical_ID\" int,\\n\"Character\" text,\\n\"Duration\" text,\\n\"age\" int,\\nPRIMARY KEY (\"Actor_ID\"),\\nFOREIGN KEY (\"Musical_ID\") REFERENCES \"actor\"(\"Actor_ID\")\\n)'}\n\n## User-Prompt:\nيرجى إظهار المرشح الذي تم ترشيحه أكبر عدد من المرات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسماء أعلى 8 دول من حيث حجم الفواتير الإجمالي وما هي تلك الأحجام؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nما هي الأسماء الكاملة للعملاء الذين لديهم حساب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nاعرض قائمة بالأسماء الرسمية للمدن التي لم تستضيف أي مسابقة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأعط أسماء الخصائص التي توجد في منتجين أو أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nما هو إجمالي مبلغ المنح الممنوحة لكل منظمة وما هو معرفها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(15),\\n`product_name` VARCHAR(80),\\n`product_price` DOUBLE NULL\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(15),\\n`customer_number` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Contacts': 'CREATE TABLE `Contacts` (\\n`contact_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(50),\\n`contact_phone` VARCHAR(80)\\n)', 'Customer_Address_History': 'CREATE TABLE `Customer_Address_History` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_date` DATETIME NOT NULL,\\n`order_status_code` VARCHAR(15),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER NOT NULL ,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(80),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nأظهر السعر الأدنى، والأقصى، والمتوسط لجميع المنتجات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.product_name , sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على العدد الإجمالي للمدرسين الذين يدرسون دورة في فصل الربيع عام 2010.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT COUNT (DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'county_public_safety': 'CREATE TABLE \"county_public_safety\" (\\n\"County_ID\" int,\\n\"Name\" text,\\n\"Population\" int,\\n\"Police_officers\" int,\\n\"Residents_per_officer\" int,\\n\"Case_burden\" int,\\n\"Crime_rate\" real,\\n\"Police_force\" text,\\n\"Location\" text,\\nPRIMARY KEY (\"County_ID\")\\n)', 'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"County_ID\" int,\\n\"Name\" text,\\n\"White\" real,\\n\"Black\" real,\\n\"Amerindian\" real,\\n\"Asian\" real,\\n\"Multiracial\" real,\\n\"Hispanic\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (\"County_ID\") REFERENCES \"county_public_safety\"(\"County_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء المدن، بالإضافة إلى أسماء المقاطعات التي تتوافق معها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Name , T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Calendar': 'CREATE TABLE Ref_Calendar (\\nCalendar_Date DATETIME NOT NULL,\\nDay_Number INTEGER,\\nPRIMARY KEY (Calendar_Date)\\n)', 'Ref_Locations': 'CREATE TABLE Ref_Locations (\\nLocation_Code CHAR(15) NOT NULL,\\nLocation_Name VARCHAR(255) NOT NULL,\\nLocation_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Location_Code)\\n)', 'Roles': 'CREATE TABLE Roles (\\nRole_Code CHAR(15) NOT NULL,\\nRole_Name VARCHAR(255),\\nRole_Description VARCHAR(255),\\nPRIMARY KEY (Role_Code)\\n)', 'All_Documents': 'CREATE TABLE All_Documents (\\nDocument_ID INTEGER NOT NULL,\\nDate_Stored DATETIME,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Name CHAR(255),\\nDocument_Description CHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Date_Stored) REFERENCES Ref_Calendar (Calendar_Date)\\n)', 'Employees': 'CREATE TABLE Employees (\\nEmployee_ID INTEGER NOT NULL,\\nRole_Code CHAR(15) NOT NULL,\\nEmployee_Name VARCHAR(255),\\nGender_MFU CHAR(1) NOT NULL,\\nDate_of_Birth DATETIME NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Employee_ID),\\nFOREIGN KEY (Role_Code) REFERENCES Roles (Role_Code)\\n)', 'Document_Locations': 'CREATE TABLE Document_Locations (\\nDocument_ID INTEGER NOT NULL,\\nLocation_Code CHAR(15) NOT NULL,\\nDate_in_Location_From DATETIME NOT NULL,\\nDate_in_Locaton_To DATETIME,\\nPRIMARY KEY (Document_ID, Location_Code, Date_in_Location_From),\\nFOREIGN KEY (Location_Code) REFERENCES Ref_Locations (Location_Code),\\nFOREIGN KEY (Date_in_Location_From) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Date_in_Locaton_To) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)', 'Documents_to_be_Destroyed': 'CREATE TABLE Documents_to_be_Destroyed (\\nDocument_ID INTEGER NOT NULL,\\nDestruction_Authorised_by_Employee_ID INTEGER,\\nDestroyed_by_Employee_ID INTEGER,\\nPlanned_Destruction_Date DATETIME,\\nActual_Destruction_Date DATETIME,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Destroyed_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Destruction_Authorised_by_Employee_ID) REFERENCES Employees (Employee_ID),\\nFOREIGN KEY (Planned_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Actual_Destruction_Date) REFERENCES Ref_Calendar (Calendar_Date),\\nFOREIGN KEY (Document_ID) REFERENCES All_Documents (Document_ID)\\n)'}\n\n## User-Prompt:\nقائمة جميع رموز المواقع وأسماء المواقع.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Ref_locations\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'list': 'CREATE TABLE \"list\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Grade\" INTEGER, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)', 'teachers': 'CREATE TABLE \"teachers\" ( \\n\\t\"LastName\" TEXT, \\n\\t\"FirstName\" TEXT, \\n\\t\"Classroom\" INTEGER,\\n\\tPRIMARY KEY(LastName, FirstName)\\n)'}\n\n## User-Prompt:\nأي فصل دراسي يحتوي على أكبر عدد من الطلاب؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nالعثور على عنوان الدورة التي يقدمها كل من قسم الإحصاء وعلم النفس.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Customer_Policies': 'CREATE TABLE Customer_Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATE,\\nEnd_Date DATE,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nPRIMARY KEY (Claim_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Customer_Policies (Policy_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nCustomer_Policy_ID INTEGER NOT NULL,\\nPRIMARY KEY (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)', 'Payments': 'CREATE TABLE Payments (\\nPayment_ID INTEGER NOT NULL,\\nSettlement_ID INTEGER NOT NULL,\\nPayment_Method_Code VARCHAR(255),\\nDate_Payment_Made DATE,\\nAmount_Payment INTEGER,\\nPRIMARY KEY (Payment_ID),\\nFOREIGN KEY (Settlement_ID) REFERENCES Settlements (Settlement_ID)\\n)'}\n\n## User-Prompt:\nأي العملاء الذين ليس لديهم أي سياسات؟ ابحث عن تفاصيل هؤلاء العملاء.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)', 'Department': 'CREATE TABLE Department (\\n DNO \\t\\tINTEGER PRIMARY KEY,\\n Division\\t\\tVARCHAR(2),\\n DName\\t\\tVARCHAR(25),\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13),\\n DPhone\\t\\tINTEGER\\n)', 'Member_of': 'CREATE TABLE Member_of (\\n FacID \\t INTEGER,\\n DNO\\t INTEGER,\\n Appt_Type VARCHAR(15),\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Course': 'CREATE TABLE Course (\\n CID \\t \\tVARCHAR(7) PRIMARY KEY,\\n CName\\t\\tVARCHAR(40),\\n Credits\\t\\tINTEGER,\\n Instructor\\tINTEGER,\\n Days\\t\\tVARCHAR(5),\\n Hours\\t\\tVARCHAR(11),\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(Instructor) REFERENCES Faculty(FacID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Minor_in': 'CREATE TABLE Minor_in (\\n StuID \\t INTEGER,\\n DNO\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(DNO) REFERENCES Department(DNO)\\n)', 'Enrolled_in': 'CREATE TABLE Enrolled_in (\\n StuID \\t\\t INTEGER,\\n CID\\t\\tVARCHAR(7),\\n Grade\\t\\tVARCHAR(2),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(CID) REFERENCES Course(CID),\\n FOREIGN KEY(Grade) REFERENCES Gradeconversion(lettergrade)\\n)', 'Gradeconversion': 'CREATE TABLE Gradeconversion (\\n lettergrade\\t VARCHAR(2) PRIMARY KEY,\\n gradepoint\\t FLOAT\\n)'}\n\n## User-Prompt:\nما هي أسماء الدورات، مرتبة حسب الائتمان؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT CName FROM COURSE ORDER BY Credits\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nما هي أسماء وأسعار المتوسطة للمنتجات للشركات المصنعة التي تكلف منتجاتها في المتوسط 150 دولارًا أو أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هي جميع الأفلام التي تم تصنيفها كـ R؟ قم بتسجيل الأعناوي.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT language_id) FROM film\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nأي نشاط يشارك فيه أكبر عدد من أعضاء هيئة التدريس؟ ابحث عن اسم النشاط.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Hotel_Star_Ratings': 'CREATE TABLE Ref_Hotel_Star_Ratings (\\nstar_rating_code CHAR(15) NOT NULL,\\nstar_rating_description VARCHAR(80),\\nPRIMARY KEY (star_rating_code),\\nUNIQUE (star_rating_code)\\n)', 'Locations': 'CREATE TABLE Locations (\\nLocation_ID INTEGER NOT NULL,\\nLocation_Name VARCHAR(255),\\nAddress VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Location_ID)\\n)', 'Ref_Attraction_Types': 'CREATE TABLE Ref_Attraction_Types (\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nAttraction_Type_Description VARCHAR(255),\\nPRIMARY KEY (Attraction_Type_Code),\\nUNIQUE (Attraction_Type_Code)\\n)', 'Visitors': 'CREATE TABLE Visitors (\\nTourist_ID INTEGER NOT NULL,\\nTourist_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_ID),\\nUNIQUE (Tourist_ID)\\n)', 'Features': 'CREATE TABLE Features (\\nFeature_ID INTEGER NOT NULL,\\nFeature_Details VARCHAR(255),\\nPRIMARY KEY (Feature_ID)\\n)', 'Hotels': 'CREATE TABLE Hotels (\\nhotel_id INTEGER NOT NULL,\\nstar_rating_code CHAR(15) NOT NULL,\\npets_allowed_yn CHAR(1),\\nprice_range real,\\nother_hotel_details VARCHAR(255),\\nPRIMARY KEY (hotel_id),\\nFOREIGN KEY (star_rating_code) REFERENCES Ref_Hotel_Star_Ratings (star_rating_code)\\n)', 'Tourist_Attractions': 'CREATE TABLE Tourist_Attractions (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nAttraction_Type_Code CHAR(15) NOT NULL,\\nLocation_ID INTEGER NOT NULL,\\nHow_to_Get_There VARCHAR(255),\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nOpening_Hours VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Tourist_Attraction_ID),\\nFOREIGN KEY (Location_ID) REFERENCES Locations (Location_ID),\\nFOREIGN KEY (Attraction_Type_Code) REFERENCES Ref_Attraction_Types (Attraction_Type_Code)\\n)', 'Street_Markets': 'CREATE TABLE Street_Markets (\\nMarket_ID INTEGER NOT NULL,\\nMarket_Details VARCHAR(255),\\nPRIMARY KEY (Market_ID),\\nFOREIGN KEY (Market_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Shops': 'CREATE TABLE Shops (\\nShop_ID INTEGER NOT NULL,\\nShop_Details VARCHAR(255),\\nPRIMARY KEY (Shop_ID),\\nFOREIGN KEY (Shop_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Museums': 'CREATE TABLE Museums (\\nMuseum_ID INTEGER NOT NULL,\\nMuseum_Details VARCHAR(255),\\nPRIMARY KEY (Museum_ID),\\nFOREIGN KEY (Museum_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Royal_Family': 'CREATE TABLE Royal_Family (\\nRoyal_Family_ID INTEGER NOT NULL,\\nRoyal_Family_Details VARCHAR(255),\\nPRIMARY KEY (Royal_Family_ID),\\nFOREIGN KEY (Royal_Family_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Theme_Parks': 'CREATE TABLE Theme_Parks (\\nTheme_Park_ID INTEGER NOT NULL,\\nTheme_Park_Details VARCHAR(255),\\nPRIMARY KEY (Theme_Park_ID),\\nFOREIGN KEY (Theme_Park_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Visits': 'CREATE TABLE Visits (\\nVisit_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nTourist_ID INTEGER NOT NULL,\\nVisit_Date DATETIME NOT NULL,\\nVisit_Details VARCHAR(40) NOT NULL,\\nPRIMARY KEY (Visit_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Tourist_ID) REFERENCES Visitors (Tourist_ID)\\n)', 'Photos': 'CREATE TABLE Photos (\\nPhoto_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(255),\\nDescription VARCHAR(255),\\nFilename VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Photo_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Staff': 'CREATE TABLE Staff (\\nStaff_ID INTEGER NOT NULL,\\nTourist_Attraction_ID INTEGER NOT NULL,\\nName VARCHAR(40),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Staff_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID)\\n)', 'Tourist_Attraction_Features': 'CREATE TABLE Tourist_Attraction_Features (\\nTourist_Attraction_ID INTEGER NOT NULL,\\nFeature_ID INTEGER NOT NULL,\\nPRIMARY KEY (Tourist_Attraction_ID, Feature_ID),\\nFOREIGN KEY (Tourist_Attraction_ID) REFERENCES Tourist_Attractions (Tourist_Attraction_ID),\\nFOREIGN KEY (Feature_ID) REFERENCES Features (Feature_ID)\\n)'}\n\n## User-Prompt:\nعد عدد السياح الذين لم يزروا أي مكان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'swimmer': 'CREATE TABLE \"swimmer\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Nationality\" text,\\n\"meter_100\" real,\\n\"meter_200\" text,\\n\"meter_300\" text,\\n\"meter_400\" text,\\n\"meter_500\" text,\\n\"meter_600\" text,\\n\"meter_700\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"ID\")\\n)', 'stadium': 'CREATE TABLE \"stadium\" (\\n\"ID\" int,\\n\"name\" text,\\n\"Capacity\" int,\\n\"City\" text,\\n\"Country\" text,\\n\"Opening_year\" int,\\nPRIMARY KEY (\"ID\")\\n)', 'event': 'CREATE TABLE \"event\" (\\n\"ID\" int,\\n\"Name\" text,\\n\"Stadium_ID\" int,\\n\"Year\" text,\\nPRIMARY KEY (\"ID\"),\\nFOREIGN KEY (`Stadium_ID`) REFERENCES `stadium`(`ID`)\\n)', 'record': 'CREATE TABLE \"record\" (\\n\"ID\" int,\\n\"Result\" text,\\n\"Swimmer_ID\" int,\\n\"Event_ID\" int,\\nPRIMARY KEY (\"Swimmer_ID\",\"Event_ID\"),\\nFOREIGN KEY (`Event_ID`) REFERENCES `event`(`ID`),\\nFOREIGN KEY (`Swimmer_ID`) REFERENCES `swimmer`(`ID`)\\n)'}\n\n## User-Prompt:\nكم عدد المدن التي تحتوي على ملعب تم افتتاحه قبل عام 2006؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى، ومواقع المكاتب، والأقسام لجميع المدرسين، وأيضًا ما هي وصف الدورات التي يدرسون؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.emp_fname , T4.prof_office , T3.crs_description , T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nما هي تاريخ بدء الحجز وتاريخ النهاية لحجوزات الشقة التي تم إجراؤها بواسطة الضيوف الإناث (رمز الجنس أنثى)؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Female\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'captain': 'CREATE TABLE \"captain\" (\\n\"Captain_ID\" int,\\n\"Name\" text,\\n\"Ship_ID\" int,\\n\"age\" text,\\n\"Class\" text,\\n\"Rank\" text,\\nPRIMARY KEY (\"Captain_ID\"),\\nFOREIGN KEY (\"Ship_ID\") REFERENCES \"Ship\"(\"Ship_ID\")\\n)', 'Ship': 'CREATE TABLE \"Ship\" (\\n\"Ship_ID\" int,\\n\"Name\" text,\\n\"Type\" text,\\n\"Built_Year\" real,\\n\"Class\" text,\\n\"Flag\" text,\\nPRIMARY KEY (\"Ship_ID\")\\n)'}\n\n## User-Prompt:\nفي أي سنة تم بناء معظم السفن؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هي أسماء أعلى 5 دول من حيث عدد الفواتير وكم عددها؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'entrepreneur': 'CREATE TABLE \"entrepreneur\" (\\n\"Entrepreneur_ID\" int,\\n\"People_ID\" int,\\n\"Company\" text,\\n\"Money_Requested\" real,\\n\"Investor\" text,\\nPRIMARY KEY (\"Entrepreneur_ID\"),\\nFOREIGN KEY (\"People_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Height\" real,\\n\"Weight\" real,\\n\"Date_of_Birth\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي أسماء رواد الأعمال الذين ليس مستثمروهم هم Rachel Elnaugh؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'classroom': 'CREATE TABLE classroom\\n\\t(building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t capacity\\t\\tnumeric(4,0),\\n\\t primary key (building, room_number)\\n\\t)', 'department': 'CREATE TABLE department\\n\\t(dept_name\\t\\tvarchar(20),\\n\\t building\\t\\tvarchar(15),\\n\\t budget\\t\\t numeric(12,2) check (budget > 0),\\n\\t primary key (dept_name)\\n\\t)', 'course': 'CREATE TABLE course\\n\\t(course_id\\t\\tvarchar(8),\\n\\t title\\t\\t\\tvarchar(50),\\n\\t dept_name\\t\\tvarchar(20) NULL,\\n\\t credits\\t\\tnumeric(2,0) check (credits > 0),\\n\\t primary key (course_id),\\n FOREIGN KEY (dept_name)\\n REFERENCES `department` (dept_name)\\n ON DELETE SET NULL\\n-- ON UPDATE NO ACTION\\n-- foreign key (dept_name) references department\\n-- on delete set null\\n )', 'instructor': 'CREATE TABLE instructor\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t salary\\t\\t\\tnumeric(8,2) check (salary > 29000),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'section': \"CREATE TABLE section\\n\\t(course_id\\t\\tvarchar(8),\\n sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6)\\n\\t\\tcheck (semester in ('Fall', 'Winter', 'Spring', 'Summer')),\\n\\t year\\t\\t\\tnumeric(4,0) check (year > 1701 and year < 2100),\\n\\t building\\t\\tvarchar(15),\\n\\t room_number\\t\\tvarchar(7),\\n\\t time_slot_id\\t\\tvarchar(4),\\n\\t primary key (course_id, sec_id, semester, year),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (building, room_number) references classroom (building, room_number)\\n\\t\\ton delete set null\\n\\t)\", 'teaches': 'CREATE TABLE teaches\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references instructor (ID)\\n\\t\\ton delete cascade\\n\\t)', 'student': 'CREATE TABLE student\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t name\\t\\t\\tvarchar(20) not null,\\n\\t dept_name\\t\\tvarchar(20),\\n\\t tot_cred\\t\\tnumeric(3,0) check (tot_cred >= 0),\\n\\t primary key (ID),\\n\\t foreign key (dept_name) references department (dept_name)\\n\\t\\ton delete set null\\n\\t)', 'takes': 'CREATE TABLE takes\\n\\t(ID\\t\\t\\tvarchar(5),\\n\\t course_id\\t\\tvarchar(8),\\n\\t sec_id\\t\\t\\tvarchar(8),\\n\\t semester\\t\\tvarchar(6),\\n\\t year\\t\\t\\tnumeric(4,0),\\n\\t grade\\t\\t varchar(2),\\n\\t primary key (ID, course_id, sec_id, semester, year),\\n\\t foreign key (course_id,sec_id, semester, year) references section (course_id, sec_id, semester, year)\\n\\t\\ton delete cascade,\\n\\t foreign key (ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'advisor': 'CREATE TABLE advisor\\n\\t(s_ID\\t\\t\\tvarchar(5),\\n\\t i_ID\\t\\t\\tvarchar(5),\\n\\t primary key (s_ID),\\n\\t foreign key (i_ID) references instructor (ID)\\n\\t\\ton delete set null,\\n\\t foreign key (s_ID) references student (ID)\\n\\t\\ton delete cascade\\n\\t)', 'time_slot': 'CREATE TABLE time_slot\\n\\t(time_slot_id\\t\\tvarchar(4),\\n\\t day\\t\\t\\tvarchar(1),\\n\\t start_hr\\t\\tnumeric(2) check (start_hr >= 0 and start_hr < 24),\\n\\t start_min\\t\\tnumeric(2) check (start_min >= 0 and start_min < 60),\\n\\t end_hr\\t\\t\\tnumeric(2) check (end_hr >= 0 and end_hr < 24),\\n\\t end_min\\t\\tnumeric(2) check (end_min >= 0 and end_min < 60),\\n\\t primary key (time_slot_id, day, start_hr, start_min)\\n\\t)', 'prereq': 'CREATE TABLE prereq\\n\\t(course_id\\t\\tvarchar(8),\\n\\t prereq_id\\t\\tvarchar(8),\\n\\t primary key (course_id, prereq_id),\\n\\t foreign key (course_id) references course (course_id)\\n\\t\\ton delete cascade,\\n\\t foreign key (prereq_id) references course (course_id)\\n\\t)'}\n\n## User-Prompt:\nما هي المعرفات للدورات التي تم تقديمها في خريف عام 2009 ولكن لم تكن في ربيع عام 2010؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هي الأسماء المختلفة وبلدان الأصل لجميع الفنانين الذين تقييم أغانيهم أعلى من 9؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'follows': 'CREATE TABLE `follows` (\\n `f1` int(11) NOT NULL,\\n `f2` int(11) NOT NULL,\\n PRIMARY KEY (`f1`,`f2`),\\n FOREIGN KEY (`f1`) REFERENCES `user_profiles`(`uid`),\\n FOREIGN KEY (`f2`) REFERENCES `user_profiles`(`uid`)\\n\\n)', 'tweets': 'CREATE TABLE `tweets` (\\n `id` bigint(20) NOT NULL,\\n `uid` int(11) NOT NULL,\\n `text` char(140) NOT NULL,\\n `createdate` datetime DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (`id`),\\n FOREIGN KEY (`uid`) REFERENCES `user_profiles`(`uid`)\\n)', 'user_profiles': 'CREATE TABLE \"user_profiles\" (`uid` int(11) NOT NULL, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `partitionid` int(11) DEFAULT NULL, `followers` int(11) DEFAULT NULL, PRIMARY KEY (`uid`))'}\n\n## User-Prompt:\nارجع نص التغريدات حول موضوع 'التدريب'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT text FROM tweets WHERE text LIKE '%intern%'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Apartment_Buildings': 'CREATE TABLE Apartment_Buildings (\\nbuilding_id INTEGER NOT NULL,\\nbuilding_short_name CHAR(15),\\nbuilding_full_name VARCHAR(80),\\nbuilding_description VARCHAR(255),\\nbuilding_address VARCHAR(255),\\nbuilding_manager VARCHAR(50),\\nbuilding_phone VARCHAR(80),\\nPRIMARY KEY (building_id),\\nUNIQUE (building_id)\\n)', 'Apartments': 'CREATE TABLE Apartments (\\napt_id INTEGER NOT NULL ,\\nbuilding_id INTEGER NOT NULL,\\napt_type_code CHAR(15),\\napt_number CHAR(10),\\nbathroom_count INTEGER,\\nbedroom_count INTEGER,\\nroom_count CHAR(5),\\nPRIMARY KEY (apt_id),\\nUNIQUE (apt_id),\\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\\n)', 'Apartment_Facilities': 'CREATE TABLE Apartment_Facilities (\\napt_id INTEGER NOT NULL,\\nfacility_code CHAR(15) NOT NULL,\\nPRIMARY KEY (apt_id, facility_code),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\\n)', 'Guests': 'CREATE TABLE Guests (\\nguest_id INTEGER NOT NULL ,\\ngender_code CHAR(1),\\nguest_first_name VARCHAR(80),\\nguest_last_name VARCHAR(80),\\ndate_of_birth DATETIME,\\nPRIMARY KEY (guest_id),\\nUNIQUE (guest_id)\\n)', 'Apartment_Bookings': 'CREATE TABLE Apartment_Bookings (\\napt_booking_id INTEGER NOT NULL,\\napt_id INTEGER,\\nguest_id INTEGER NOT NULL,\\nbooking_status_code CHAR(15) NOT NULL,\\nbooking_start_date DATETIME,\\nbooking_end_date DATETIME,\\nPRIMARY KEY (apt_booking_id),\\nUNIQUE (apt_booking_id),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\\n)', 'View_Unit_Status': 'CREATE TABLE View_Unit_Status (\\napt_id INTEGER,\\napt_booking_id INTEGER,\\nstatus_date DATETIME NOT NULL,\\navailable_yn BIT,\\nPRIMARY KEY (status_date),\\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\\n)'}\n\n## User-Prompt:\nأظهر أكواد أنواع الشقق الثلاثة الأعلى مرتبة حسب المتوسط لعدد الغرف تنازليا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1_number_building` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_address_id` INTEGER NOT NULL,\\n`nickname` VARCHAR(80),\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`date_of_birth` DATETIME,\\n`date_joined_staff` DATETIME,\\n`date_left_staff` DATETIME,\\nFOREIGN KEY (`staff_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Vehicles': 'CREATE TABLE `Vehicles` (\\n`vehicle_id` INTEGER PRIMARY KEY,\\n`vehicle_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_address_id` INTEGER NOT NULL,\\n`customer_status_code` VARCHAR(15) NOT NULL,\\n`date_became_customer` DATETIME,\\n`date_of_birth` DATETIME,\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`amount_outstanding` DOUBLE NULL,\\n`email_address` VARCHAR(250),\\n`phone_number` VARCHAR(255),\\n`cell_mobile_phone_number` VARCHAR(255),\\nFOREIGN KEY (`customer_address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Customer_Payments': 'CREATE TABLE `Customer_Payments` (\\n`customer_id` INTEGER NOT NULL,\\n`datetime_payment` DATETIME NOT NULL,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`amount_payment` DOUBLE NULL,\\nPRIMARY KEY (`customer_id`,`datetime_payment`),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Lessons': 'CREATE TABLE `Lessons` (\\n`lesson_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`lesson_status_code` VARCHAR(15) NOT NULL,\\n`staff_id` INTEGER,\\n`vehicle_id` INTEGER NOT NULL,\\n`lesson_date` DATETIME,\\n`lesson_time` VARCHAR(10),\\n`price` DOUBLE NULL,\\nFOREIGN KEY (`vehicle_id` ) REFERENCES `Vehicles`(`vehicle_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nكم عدد أعضاء هيئة التدريس لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.vehicle_id , T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Premises': 'CREATE TABLE `Premises` (\\n`premise_id` INTEGER PRIMARY KEY,\\n`premises_type` VARCHAR(15) NOT NULL,\\n`premise_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_category` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_login` VARCHAR(80),\\n`customer_password` VARCHAR(10)\\n)', 'Mailshot_Campaigns': 'CREATE TABLE `Mailshot_Campaigns` (\\n`mailshot_id` INTEGER PRIMARY KEY,\\n`product_category` VARCHAR(15),\\n`mailshot_name` VARCHAR(80),\\n`mailshot_start_date` DATETIME,\\n`mailshot_end_date` DATETIME\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`premise_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type_code` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`premise_id` ) REFERENCES `Premises`(`premise_id` )\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(15) NOT NULL,\\n`shipping_method_code` VARCHAR(15) NOT NULL,\\n`order_placed_datetime` DATETIME NOT NULL,\\n`order_delivered_datetime` DATETIME,\\n`order_shipping_charges` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Mailshot_Customers': 'CREATE TABLE `Mailshot_Customers` (\\n`mailshot_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(15) NOT NULL,\\n`mailshot_customer_date` DATETIME,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` ),\\nFOREIGN KEY (`mailshot_id` ) REFERENCES `Mailshot_Campaigns`(`mailshot_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`item_id` INTEGER NOT NULL ,\\n`order_item_status_code` VARCHAR(15) NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`item_status_code` VARCHAR(15),\\n`item_delivered_datetime` DATETIME,\\n`item_order_quantity` VARCHAR(80),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nعرض جميع فئات المنتجات المتميزة جنبًا إلى جنب مع عدد الرسائل البريدية في كل فئة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT premises_type , count(*) FROM premises GROUP BY premises_type\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15) NOT NULL,\\nPRIMARY KEY (Service_ID)\\n)', 'Participants': 'CREATE TABLE Participants (\\nParticipant_ID INTEGER NOT NULL,\\nParticipant_Type_Code CHAR(15) NOT NULL,\\nParticipant_Details VARCHAR(255),\\nPRIMARY KEY (Participant_ID)\\n)', 'Events': 'CREATE TABLE Events (\\nEvent_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nEvent_Details VARCHAR(255),\\nPRIMARY KEY (Event_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID)\\n)', 'Participants_in_Events': 'CREATE TABLE Participants_in_Events (\\nEvent_ID INTEGER NOT NULL,\\nParticipant_ID INTEGER NOT NULL,\\nPRIMARY KEY (Event_ID, Participant_ID),\\nFOREIGN KEY (Participant_ID) REFERENCES Participants (Participant_ID),\\nFOREIGN KEY (Event_ID) REFERENCES Events (Event_ID)\\n)'}\n\n## User-Prompt:\nما هو النوع الأكثر شيوعًا بين المشاركين؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE Addresses (\\naddress_id INTEGER NOT NULL,\\nline_1 VARCHAR(80),\\nline_2 VARCHAR(80),\\ncity VARCHAR(50),\\nzip_postcode CHAR(20),\\nstate_province_county VARCHAR(50),\\ncountry VARCHAR(50),\\nPRIMARY KEY (address_id)\\n)', 'People': 'CREATE TABLE People (\\nperson_id INTEGER NOT NULL,\\nfirst_name VARCHAR(255),\\nmiddle_name VARCHAR(255),\\nlast_name VARCHAR(255),\\ncell_mobile_number VARCHAR(40),\\nemail_address VARCHAR(40),\\nlogin_name VARCHAR(40),\\npassword VARCHAR(40),\\nPRIMARY KEY (person_id)\\n)', 'Students': 'CREATE TABLE Students (\\nstudent_id INTEGER NOT NULL,\\nstudent_details VARCHAR(255),\\nPRIMARY KEY (student_id),\\nFOREIGN KEY (student_id) REFERENCES People (person_id)\\n)', 'Courses': 'CREATE TABLE Courses (\\ncourse_id VARCHAR(100) NOT NULL,\\ncourse_name VARCHAR(120),\\ncourse_description VARCHAR(255),\\nother_details VARCHAR(255),\\nPRIMARY KEY (course_id)\\n)', 'People_Addresses': 'CREATE TABLE People_Addresses (\\nperson_address_id INTEGER NOT NULL,\\nperson_id INTEGER NOT NULL,\\naddress_id INTEGER NOT NULL,\\ndate_from DATETIME,\\ndate_to DATETIME,\\nPRIMARY KEY (person_address_id),\\nFOREIGN KEY (person_id) REFERENCES People (person_id),\\nFOREIGN KEY (address_id) REFERENCES Addresses (address_id)\\n)', 'Student_Course_Registrations': 'CREATE TABLE Student_Course_Registrations (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\nregistration_date DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id) REFERENCES Students (student_id),\\nFOREIGN KEY (course_id) REFERENCES Courses (course_id)\\n)', 'Student_Course_Attendance': 'CREATE TABLE Student_Course_Attendance (\\nstudent_id INTEGER NOT NULL,\\ncourse_id INTEGER NOT NULL,\\ndate_of_attendance DATETIME NOT NULL,\\nPRIMARY KEY (student_id, course_id),\\nFOREIGN KEY (student_id, course_id) REFERENCES Student_Course_Registrations (student_id,course_id)\\n)', 'Candidates': 'CREATE TABLE Candidates (\\ncandidate_id INTEGER NOT NULL ,\\ncandidate_details VARCHAR(255),\\nPRIMARY KEY (candidate_id),\\nFOREIGN KEY (candidate_id) REFERENCES People (person_id)\\n)', 'Candidate_Assessments': 'CREATE TABLE Candidate_Assessments (\\ncandidate_id INTEGER NOT NULL,\\nqualification CHAR(15) NOT NULL,\\nassessment_date DATETIME NOT NULL,\\nasessment_outcome_code CHAR(15) NOT NULL,\\nPRIMARY KEY (candidate_id, qualification),\\nFOREIGN KEY (candidate_id) REFERENCES Candidates (candidate_id)\\n)'}\n\n## User-Prompt:\nما هي تفاصيل الطالب الذي سجل أكبر عدد من الدورات؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nكم عدد العملاء الذين لديهم قيمة نشطة تساوي 1؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`gender` VARCHAR(1),\\n`first_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_type_code` VARCHAR(20) NOT NULL,\\n`address_line_1` VARCHAR(80),\\n`address_line_2` VARCHAR(80),\\n`town_city` VARCHAR(80),\\n`state` VARCHAR(80),\\n`email_address` VARCHAR(255),\\n`phone_number` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`product_category_code` VARCHAR(20) NOT NULL,\\n`date_product_first_available` DATETIME,\\n`date_product_discontinued` DATETIME,\\n`product_name` VARCHAR(80),\\n`product_description` VARCHAR(255),\\n`product_price` DECIMAL(19,4)\\n)', 'Complaints': 'CREATE TABLE `Complaints` (\\n`complaint_id` INTEGER NOT NULL ,\\n`product_id` INTEGER NOT NULL,\\n`customer_id` INTEGER NOT NULL,\\n`complaint_outcome_code` VARCHAR(20) NOT NULL,\\n`complaint_status_code` VARCHAR(20) NOT NULL,\\n`complaint_type_code` VARCHAR(20) NOT NULL,\\n`date_complaint_raised` DATETIME,\\n`date_complaint_closed` DATETIME,\\n`staff_id` INTEGER NOT NULL ,\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)'}\n\n## User-Prompt:\nأعرض المدينة التي يكون لديها رمز نوع الزبون تصنيف الائتمان الجيد الذي كان عدد الزبائن فيها الأقل.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'bank': 'CREATE TABLE bank (\\nbranch_ID int PRIMARY KEY,\\nbname varchar(20),\\nno_of_customers int,\\ncity varchar(10),\\nstate varchar(20))', 'customer': 'CREATE TABLE customer (\\ncust_ID varchar(3) PRIMARY KEY,\\ncust_name varchar(20),\\nacc_type char(1),\\nacc_bal int,\\nno_of_loans int,\\ncredit_score int,\\nbranch_ID int,\\nstate varchar(20),\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID))', 'loan': 'CREATE TABLE loan (\\nloan_ID varchar(3) PRIMARY KEY,\\nloan_type varchar(15),\\ncust_ID varchar(3),\\nbranch_ID varchar(3),\\namount int,\\nFOREIGN KEY(branch_ID) REFERENCES bank(branch_ID),\\nFOREIGN KEY(Cust_ID) REFERENCES customer(Cust_ID))'}\n\n## User-Prompt:\nما هي أسماء العملاء الذين ليس لديهم حسابات توفير؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'station': 'CREATE TABLE station (\\n id INTEGER PRIMARY KEY,\\n name TEXT,\\n lat NUMERIC,\\n long NUMERIC,\\n dock_count INTEGER,\\n city TEXT,\\n installation_date TEXT)', 'status': 'CREATE TABLE status (\\n station_id INTEGER,\\n bikes_available INTEGER,\\n docks_available INTEGER,\\n time TEXT,\\n FOREIGN KEY (station_id) REFERENCES station(id)\\n)', 'trip': 'CREATE TABLE trip (\\n id INTEGER PRIMARY KEY,\\n duration INTEGER,\\n start_date TEXT,\\n start_station_name TEXT, -- this should be removed\\n start_station_id INTEGER,\\n end_date TEXT,\\n end_station_name TEXT, -- this should be removed\\n end_station_id INTEGER,\\n bike_id INTEGER,\\n subscription_type TEXT,\\n zip_code INTEGER)', 'weather': 'CREATE TABLE weather (\\n date TEXT,\\n max_temperature_f INTEGER,\\n mean_temperature_f INTEGER,\\n min_temperature_f INTEGER,\\n max_dew_point_f INTEGER,\\n mean_dew_point_f INTEGER,\\n min_dew_point_f INTEGER,\\n max_humidity INTEGER,\\n mean_humidity INTEGER,\\n min_humidity INTEGER,\\n max_sea_level_pressure_inches NUMERIC,\\n mean_sea_level_pressure_inches NUMERIC,\\n min_sea_level_pressure_inches NUMERIC,\\n max_visibility_miles INTEGER,\\n mean_visibility_miles INTEGER,\\n min_visibility_miles INTEGER,\\n max_wind_Speed_mph INTEGER,\\n mean_wind_speed_mph INTEGER,\\n max_gust_speed_mph INTEGER,\\n precipitation_inches INTEGER,\\n cloud_cover INTEGER,\\n events TEXT,\\n wind_dir_degrees INTEGER,\\n zip_code INTEGER)'}\n\n## User-Prompt:\nاعرض على معرفات وأسماء المحطات التي بدأت منها ما لا يقل عن 200 رحلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'grapes': 'CREATE TABLE \"grapes\" ( \\n\\t\"ID\" INTEGER PRIMARY KEY, \\n\\t\"Grape\" TEXT UNIQUE, \\n\\t\"Color\" TEXT \\n)', 'appellations': 'CREATE TABLE \"appellations\" ( \\n\\t\"No\" INTEGER PRIMARY KEY, \\n\\t\"Appelation\" TEXT UNIQUE, \\n\\t\"County\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Area\" TEXT, \\n\\t\"isAVA\" TEXT\\n)', 'wine': 'CREATE TABLE \"wine\" ( \\n\\t\"No\" INTEGER, \\n\\t\"Grape\" TEXT, \\n\\t\"Winery\" TEXT, \\n\\t\"Appelation\" TEXT, \\n\\t\"State\" TEXT, \\n\\t\"Name\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Price\" INTEGER, \\n\\t\"Score\" INTEGER, \\n\\t\"Cases\" INTEGER, \\n\\t\"Drink\" TEXT,\\n\\tFOREIGN KEY (Grape) REFERENCES grapes(Grape),\\n\\tFOREIGN KEY (Appelation) REFERENCES appellations(Appelation)\\n)'}\n\n## User-Prompt:\nمن أي مزرعة أتت النبيذ الذي حصل على أعلى تقييم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM WINE ORDER BY Score LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Restaurant': 'CREATE TABLE Restaurant (\\n ResID INTEGER PRIMARY KEY,\\n ResName VARCHAR(100),\\n Address VARCHAR(100),\\n Rating INTEGER\\n)', 'Type_Of_Restaurant': 'CREATE TABLE Type_Of_Restaurant (\\n ResID INTEGER,\\n ResTypeID INTEGER,\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID),\\n FOREIGN KEY(ResTypeID) REFERENCES Restaurant_Type(ResTypeID)\\n)', 'Restaurant_Type': 'CREATE TABLE Restaurant_Type (\\n ResTypeID INTEGER PRIMARY KEY,\\n ResTypeName VARCHAR(40),\\n ResTypeDescription VARCHAR(100)\\n)', 'Visits_Restaurant': 'CREATE TABLE Visits_Restaurant (\\n StuID INTEGER,\\n ResID INTEGER,\\n Time TIMESTAMP,\\n Spent FLOAT,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(ResID) REFERENCES Restaurant(ResID)\\n)'}\n\n## User-Prompt:\nأي مستشار لديه معظم الطلاب؟ أذكر اسم المستشار وعدد الطلاب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Student WHERE Advisor = 1121;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'race': 'CREATE TABLE \"race\" (\\n\"Race_ID\" int,\\n\"Name\" text,\\n\"Class\" text,\\n\"Date\" text,\\n\"Track_ID\" text,\\nPRIMARY KEY (\"Race_ID\"),\\nFOREIGN KEY (\"Track_ID\") REFERENCES \"track\"(\"Track_ID\")\\n)', 'track': 'CREATE TABLE \"track\" (\\n\"Track_ID\" int,\\n\"Name\" text,\\n\"Location\" text,\\n\"Seating\" real,\\n\"Year_Opened\" real,\\nPRIMARY KEY (\"Track_ID\")\\n)'}\n\n## User-Prompt:\nأظهر جميع أسماء المضامير التي لم تكن لها سباقات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Document_Types': 'CREATE TABLE `Document_Types` (\\n`document_type_code` VARCHAR(10) PRIMARY KEY,\\n`document_description` VARCHAR(255) NOT NULL\\n)', 'Documents': 'CREATE TABLE `Documents` (\\n`document_id` INTEGER PRIMARY KEY,\\n`document_type_code` VARCHAR(10),\\n`grant_id` INTEGER NOT NULL,\\n`sent_date` DATETIME NOT NULL,\\n`response_received_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`document_type_code` ) REFERENCES `Document_Types`(`document_type_code` ),\\nFOREIGN KEY (`grant_id` ) REFERENCES `Grants`(`grant_id` )\\n)', 'Grants': 'CREATE TABLE `Grants` (\\n`grant_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`grant_amount` DECIMAL(19,4) NOT NULL DEFAULT 0,\\n`grant_start_date` DATETIME NOT NULL,\\n`grant_end_date` DATETIME NOT NULL,\\n`other_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Organisation_Types': 'CREATE TABLE `Organisation_Types` (\\n`organisation_type` VARCHAR(10) PRIMARY KEY,\\n`organisation_type_description` VARCHAR(255) NOT NULL\\n)', 'Organisations': 'CREATE TABLE `Organisations` (\\n`organisation_id` INTEGER PRIMARY KEY,\\n`organisation_type` VARCHAR(10) NOT NULL,\\n`organisation_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_type` ) REFERENCES `Organisation_Types`(`organisation_type` )\\n)', 'Project_Outcomes': 'CREATE TABLE `Project_Outcomes` (\\n`project_id` INTEGER NOT NULL,\\n`outcome_code` VARCHAR(10) NOT NULL,\\n`outcome_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`outcome_code` ) REFERENCES `Research_Outcomes`(`outcome_code` )\\n)', 'Project_Staff': 'CREATE TABLE `Project_Staff` (\\n`staff_id` DOUBLE PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`role_code` VARCHAR(10) NOT NULL,\\n`date_from` DATETIME,\\n`date_to` DATETIME,\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` ),FOREIGN KEY (`role_code` ) REFERENCES `Staff_Roles`(`role_code` )\\n)', 'Projects': 'CREATE TABLE `Projects` (\\n`project_id` INTEGER PRIMARY KEY,\\n`organisation_id` INTEGER NOT NULL,\\n`project_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Research_Outcomes': 'CREATE TABLE `Research_Outcomes` (\\n`outcome_code` VARCHAR(10) PRIMARY KEY,\\n`outcome_description` VARCHAR(255) NOT NULL\\n)', 'Research_Staff': 'CREATE TABLE `Research_Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`employer_organisation_id` INTEGER NOT NULL,\\n`staff_details` VARCHAR(255) NOT NULL,\\nFOREIGN KEY (`employer_organisation_id` ) REFERENCES `Organisations`(`organisation_id` )\\n)', 'Staff_Roles': 'CREATE TABLE `Staff_Roles` (\\n`role_code` VARCHAR(10) PRIMARY KEY,\\n`role_description` VARCHAR(255) NOT NULL\\n)', 'Tasks': 'CREATE TABLE `Tasks` (\\n`task_id` INTEGER PRIMARY KEY,\\n`project_id` INTEGER NOT NULL,\\n`task_details` VARCHAR(255) NOT NULL,\\n`eg Agree Objectives` VARCHAR(1),\\nFOREIGN KEY (`project_id` ) REFERENCES `Projects`(`project_id` )\\n)'}\n\n## User-Prompt:\nقم بتقديم تفاصيل المشروعات التي تم إطلاقها بواسطة المنظمة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'gymnast': 'CREATE TABLE \"gymnast\" (\\n\"Gymnast_ID\" int,\\n\"Floor_Exercise_Points\" real,\\n\"Pommel_Horse_Points\" real,\\n\"Rings_Points\" real,\\n\"Vault_Points\" real,\\n\"Parallel_Bars_Points\" real,\\n\"Horizontal_Bar_Points\" real,\\n\"Total_Points\" real,\\nPRIMARY KEY (\"Gymnast_ID\"),\\nFOREIGN KEY (\"Gymnast_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\n\"Height\" real,\\n\"Hometown\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي أعمار الجمبازين، مرتبة تنازليًا حسب نقاطهم الإجمالية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nابحث عن اسم الدخول لمؤلف الدورة الذي يدرس الدورة بالاسم قاعدة بيانات متقدمة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"Official_Name\" text,\\n\"Status\" text,\\n\"Area_km_2\" real,\\n\"Population\" real,\\n\"Census_Ranking\" text,\\nPRIMARY KEY (\"City_ID\")\\n)', 'farm': 'CREATE TABLE \"farm\" (\\n\"Farm_ID\" int,\\n\"Year\" int,\\n\"Total_Horses\" real,\\n\"Working_Horses\" real,\\n\"Total_Cattle\" real,\\n\"Oxen\" real,\\n\"Bulls\" real,\\n\"Cows\" real,\\n\"Pigs\" real,\\n\"Sheep_and_Goats\" real,\\nPRIMARY KEY (\"Farm_ID\")\\n)', 'farm_competition': 'CREATE TABLE \"farm_competition\" (\\n\"Competition_ID\" int,\\n\"Year\" int,\\n\"Theme\" text,\\n\"Host_city_ID\" int,\\n\"Hosts\" text,\\nPRIMARY KEY (\"Competition_ID\"),\\nFOREIGN KEY (`Host_city_ID`) REFERENCES `city`(`City_ID`)\\n)', 'competition_record': 'CREATE TABLE \"competition_record\" (\\n\"Competition_ID\" int,\\n\"Farm_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Competition_ID\",\"Farm_ID\"),\\nFOREIGN KEY (`Competition_ID`) REFERENCES `farm_competition`(`Competition_ID`),\\nFOREIGN KEY (`Farm_ID`) REFERENCES `farm`(`Farm_ID`)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الرسمية للمدن التي يبلغ سكانها أكثر من 1500 أو أقل من 500؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الأسماء الكاملة والرواتب للموظفين الذين ينتهي اسمهم الأول بالحرف m؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هي التخصصات المميزة للطلاب الذين لديهم تصويت لأمين الصندوق؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = \"Spring\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_content` VARCHAR(80),\\n`city` VARCHAR(50),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method` VARCHAR(15) NOT NULL,\\n`customer_name` VARCHAR(80),\\n`date_became_customer` DATETIME,\\n`other_customer_details` VARCHAR(255)\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`address_type` VARCHAR(15) NOT NULL,\\n`date_address_to` DATETIME,\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Contact_Channels': 'CREATE TABLE `Customer_Contact_Channels` (\\n`customer_id` INTEGER NOT NULL,\\n`channel_code` VARCHAR(15) NOT NULL,\\n`active_from_date` DATETIME NOT NULL,\\n`active_to_date` DATETIME,\\n`contact_number` VARCHAR(50) NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(15) NOT NULL,\\n`order_date` DATETIME,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`order_quantity` VARCHAR(15),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` )\\n)'}\n\n## User-Prompt:\nحساب المدى الزمني المتوسط لنشاط قنوات الاتصال.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى ومواقع المكاتب لجميع المدرسين الذين قاموا بتدريس دورة معينة، ووصف الدورة، واسم القسم؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nقائمة بأسماء المقطوعات التي تنتمي إلى نوع الـ Rock ونوع الوسائط هو ملف صوتي MPEG.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" AND T3.name = \"MPEG audio file\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nهل يمكنك إرجاع كل تفاصيل الوظائف التي تمت من قبل أي من الموظفين الذين يكسبون حاليًا راتبًا على أو أعلى من 12000؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'wrestler': 'CREATE TABLE \"wrestler\" (\\n\"Wrestler_ID\" int,\\n\"Name\" text,\\n\"Reign\" text,\\n\"Days_held\" text,\\n\"Location\" text,\\n\"Event\" text,\\nPRIMARY KEY (\"Wrestler_ID\")\\n)', 'Elimination': 'CREATE TABLE \"Elimination\" (\\n\"Elimination_ID\" text,\\n\"Wrestler_ID\" text,\\n\"Team\" text,\\n\"Eliminated_By\" text,\\n\"Elimination_Move\" text,\\n\"Time\" text,\\nPRIMARY KEY (\"Elimination_ID\"),\\nFOREIGN KEY (\"Wrestler_ID\") REFERENCES \"wrestler\"(\"Wrestler_ID\")\\n)'}\n\n## User-Prompt:\nأذكر أسماء المصارعين الذين لم يتم إقصاؤهم.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Address_Types': 'CREATE TABLE `Ref_Address_Types` (\\n`address_type_code` VARCHAR(15) PRIMARY KEY,\\n`address_type_description` VARCHAR(80)\\n)', 'Ref_Detention_Type': 'CREATE TABLE `Ref_Detention_Type` (\\n`detention_type_code` VARCHAR(10) PRIMARY KEY,\\n`detention_type_description` VARCHAR(80)\\n)', 'Ref_Incident_Type': 'CREATE TABLE `Ref_Incident_Type` (\\n`incident_type_code` VARCHAR(10) PRIMARY KEY,\\n`incident_type_description` VARCHAR(80)\\n)', 'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`line_1` VARCHAR(120),\\n`line_2` VARCHAR(120),\\n`line_3` VARCHAR(120),\\n`city` VARCHAR(80),\\n`zip_postcode` VARCHAR(20),\\n`state_province_county` VARCHAR(50),\\n`country` VARCHAR(50),\\n`other_address_details` VARCHAR(255)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(40),\\n`last_name` VARCHAR(40),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`date_first_rental` DATETIME,\\n`date_left_university` DATETIME,\\n`other_student_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Teachers': 'CREATE TABLE `Teachers` (\\n`teacher_id` INTEGER PRIMARY KEY,\\n`address_id` INTEGER NOT NULL,\\n`first_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`last_name` VARCHAR(80),\\n`gender` VARCHAR(1),\\n`cell_mobile_number` VARCHAR(40),\\n`email_address` VARCHAR(40),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` )\\n)', 'Assessment_Notes': 'CREATE TABLE `Assessment_Notes` (\\n`notes_id` INTEGER NOT NULL ,\\n`student_id` INTEGER,\\n`teacher_id` INTEGER NOT NULL,\\n`date_of_notes` DATETIME,\\n`text_of_notes` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Behavior_Incident': 'CREATE TABLE `Behavior_Incident` (\\n`incident_id` INTEGER PRIMARY KEY,\\n`incident_type_code` VARCHAR(10) NOT NULL,\\n`student_id` INTEGER NOT NULL,\\n`date_incident_start` DATETIME,\\n`date_incident_end` DATETIME,\\n`incident_summary` VARCHAR(255),\\n`recommendations` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`incident_type_code` ) REFERENCES `Ref_Incident_Type`(`incident_type_code` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Detention': 'CREATE TABLE `Detention` (\\n`detention_id` INTEGER PRIMARY KEY,\\n`detention_type_code` VARCHAR(10) NOT NULL,\\n`teacher_id` INTEGER,\\n`datetime_detention_start` DATETIME,\\n`datetime_detention_end` DATETIME,\\n`detention_summary` VARCHAR(255),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`detention_type_code` ) REFERENCES `Ref_Detention_Type`(`detention_type_code` ),\\nFOREIGN KEY (`teacher_id` ) REFERENCES `Teachers`(`teacher_id` )\\n)', 'Student_Addresses': 'CREATE TABLE `Student_Addresses` (\\n`student_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_address_from` DATETIME NOT NULL,\\n`date_address_to` DATETIME,\\n`monthly_rental` DECIMAL(19,4),\\n`other_details` VARCHAR(255),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Students_in_Detention': 'CREATE TABLE `Students_in_Detention` (\\n`student_id` INTEGER NOT NULL,\\n`detention_id` INTEGER NOT NULL,\\n`incident_id` INTEGER NOT NULL,\\nFOREIGN KEY (`incident_id` ) REFERENCES `Behavior_Incident`(`incident_id` ),\\nFOREIGN KEY (`detention_id` ) REFERENCES `Detention`(`detention_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)'}\n\n## User-Prompt:\nما هي معرّفات وأسماء الأولى للطالب الذين تتواجد عناوينهم بأعلى متوسط إيجار شهري؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.teacher_id , T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = \"AFTER\" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هي الأسماء والتواريخ للوثائق المتوافقة مع المشروع الذي يحمل تفاصيل 'مشروع قاعدة بيانات الرسوم البيانية'؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nكم عدد الدورات التي يُقَدَّمُها قسم نظم المعلومات الحاسوبية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(DISTINCT dept_name) FROM department\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'circuits': 'CREATE TABLE \"circuits\" (\\n\"circuitId\" INTEGER PRIMARY KEY,\\n \"circuitRef\" TEXT,\\n \"name\" TEXT,\\n \"location\" TEXT,\\n \"country\" TEXT,\\n \"lat\" REAL,\\n \"lng\" REAL,\\n \"alt\" TEXT,\\n \"url\" TEXT\\n)', 'races': 'CREATE TABLE \"races\" (\\n\"raceId\" INTEGER PRIMARY KEY,\\n \"year\" INTEGER,\\n \"round\" INTEGER,\\n \"circuitId\" INTEGER,\\n \"name\" TEXT,\\n \"date\" TEXT,\\n \"time\" TEXT,\\n \"url\" TEXT,\\n FOREIGN KEY (\"circuitId\") REFERENCES \"circuits\"(\"circuitId\")\\n)', 'drivers': 'CREATE TABLE \"drivers\" (\\n\"driverId\" INTEGER PRIMARY KEY,\\n \"driverRef\" TEXT,\\n \"number\" TEXT,\\n \"code\" TEXT,\\n \"forename\" TEXT,\\n \"surname\" TEXT,\\n \"dob\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'status': 'CREATE TABLE \"status\" (\\n\"statusId\" INTEGER PRIMARY KEY,\\n \"status\" TEXT\\n)', 'seasons': 'CREATE TABLE \"seasons\" (\\n\"year\" INTEGER PRIMARY KEY,\\n \"url\" TEXT\\n)', 'constructors': 'CREATE TABLE \"constructors\" (\\n\\t\"constructorId\" INTEGER PRIMARY KEY,\\n \"constructorRef\" TEXT,\\n \"name\" TEXT,\\n \"nationality\" TEXT,\\n \"url\" TEXT\\n)', 'constructorStandings': 'CREATE TABLE \"constructorStandings\" (\\n\\t\"constructorStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'results': 'CREATE TABLE \"results\" (\\n\"resultId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"grid\" INTEGER,\\n \"position\" TEXT,\\n \"positionText\" TEXT,\\n \"positionOrder\" INTEGER,\\n \"points\" REAL,\\n \"laps\" TEXT,\\n \"time\" TEXT,\\n \"milliseconds\" TEXT,\\n \"fastestLap\" TEXT,\\n \"rank\" TEXT,\\n \"fastestLapTime\" TEXT,\\n \"fastestLapSpeed\" TEXT,\\n \"statusId\" INTEGER,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'driverStandings': 'CREATE TABLE \"driverStandings\" (\\n\"driverStandingsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"points\" REAL,\\n \"position\" INTEGER,\\n \"positionText\" TEXT,\\n \"wins\" INTEGER,\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'constructorResults': 'CREATE TABLE \"constructorResults\" (\\n\"constructorResultsId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"points\" REAL,\\n \"status\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\")\\n)', 'qualifying': 'CREATE TABLE \"qualifying\" (\\n\"qualifyId\" INTEGER PRIMARY KEY,\\n \"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"constructorId\" INTEGER,\\n \"number\" INTEGER,\\n \"position\" INTEGER,\\n \"q1\" TEXT,\\n \"q2\" TEXT,\\n \"q3\" TEXT,\\n FOREIGN KEY(\"constructorId\") REFERENCES \"constructors\"(\"constructorId\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'pitStops': 'CREATE TABLE \"pitStops\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"stop\" INTEGER,\\n \"lap\" INTEGER,\\n \"time\" TEXT,\\n \"duration\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY (\"raceId\", \"driverId\", \"stop\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)', 'lapTimes': 'CREATE TABLE \"lapTimes\" (\\n\"raceId\" INTEGER,\\n \"driverId\" INTEGER,\\n \"lap\" INTEGER,\\n \"position\" INTEGER,\\n \"time\" TEXT,\\n \"milliseconds\" INTEGER,\\n PRIMARY KEY(\"raceId\", \"driverId\", \"lap\"),\\n FOREIGN KEY(\"raceId\") REFERENCES \"races\"(\"raceId\"),\\n FOREIGN KEY (\"driverId\") REFERENCES \"drivers\"(\"driverId\")\\n)'}\n\n## User-Prompt:\nما هي أعداد السباقات لكل مُعرف مُصنّع؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Voting_record': 'CREATE TABLE Voting_record (\\n StuID \\tINTEGER,\\n Registration_Date\\t\\tVARCHAR(12),\\n Election_Cycle\\t\\tVARCHAR(12),\\n President_Vote\\t\\tINTEGER,\\n Vice_President_Vote\\t\\tINTEGER,\\n Secretary_Vote\\t\\tINTEGER,\\n Treasurer_Vote\\t\\tINTEGER,\\n Class_President_Vote\\t\\tINTEGER,\\n Class_Senator_Vote\\t\\tINTEGER,\\n FOREIGN KEY(StuID) REFERENCES Student(StuID), \\n FOREIGN KEY(President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Vice_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Secretary_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Treasurer_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_President_Vote) REFERENCES Student(StuID),\\n FOREIGN KEY(Class_Senator_Vote) REFERENCES Student(StuID)\\n)'}\n\n## User-Prompt:\nما هو عدد سجلات التصويت بشكل إجمالي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM STUDENT\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nأظهر كل رمز منطقة واسم المنطقة مرتبة حسب الرموز.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM region\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Characteristic_Types': 'CREATE TABLE `Ref_Characteristic_Types` (\\n`characteristic_type_code` VARCHAR(15) PRIMARY KEY,\\n`characteristic_type_description` VARCHAR(80)\\n)', 'Ref_Colors': 'CREATE TABLE `Ref_Colors` (\\n`color_code` VARCHAR(15) PRIMARY KEY,\\n`color_description` VARCHAR(80)\\n)', 'Ref_Product_Categories': 'CREATE TABLE `Ref_Product_Categories` (\\n`product_category_code` VARCHAR(15) PRIMARY KEY,\\n`product_category_description` VARCHAR(80),\\n`unit_of_measure` VARCHAR(20)\\n)', 'Characteristics': 'CREATE TABLE `Characteristics` (\\n`characteristic_id` INTEGER PRIMARY KEY,\\n`characteristic_type_code` VARCHAR(15) NOT NULL,\\n`characteristic_data_type` VARCHAR(10),\\n`characteristic_name` VARCHAR(80),\\n`other_characteristic_details` VARCHAR(255),\\nFOREIGN KEY (`characteristic_type_code` ) REFERENCES `Ref_Characteristic_Types`(`characteristic_type_code` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`color_code` VARCHAR(15) NOT NULL,\\n`product_category_code` VARCHAR(15) NOT NULL,\\n`product_name` VARCHAR(80),\\n`typical_buying_price` VARCHAR(20),\\n`typical_selling_price` VARCHAR(20),\\n`product_description` VARCHAR(255),\\n`other_product_details` VARCHAR(255),\\nFOREIGN KEY (`product_category_code` ) REFERENCES `Ref_Product_Categories`(`product_category_code` ),FOREIGN KEY (`color_code` ) REFERENCES `Ref_Colors`(`color_code` )\\n)', 'Product_Characteristics': 'CREATE TABLE `Product_Characteristics` (\\n`product_id` INTEGER NOT NULL,\\n`characteristic_id` INTEGER NOT NULL,\\n`product_characteristic_value` VARCHAR(50),\\nFOREIGN KEY (`characteristic_id` ) REFERENCES `Characteristics`(`characteristic_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nقائمة بجميع الأسماء المميزة للمنتجات ذات اسم الخاصية 'دافئ'.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"hot\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Payment_Methods': 'CREATE TABLE Ref_Payment_Methods (\\npayment_method_code CHAR(10) NOT NULL,\\npayment_method_description VARCHAR(80),\\nPRIMARY KEY (payment_method_code),\\nUNIQUE (payment_method_code)\\n)', 'Ref_Service_Types': 'CREATE TABLE Ref_Service_Types (\\nService_Type_Code CHAR(15) NOT NULL,\\nParent_Service_Type_Code CHAR(15),\\nService_Type_Description VARCHAR(255),\\nPRIMARY KEY (Service_Type_Code),\\nUNIQUE (Service_Type_Code)\\n)', 'Addresses': 'CREATE TABLE Addresses (\\nAddress_ID VARCHAR(100) NOT NULL,\\nLine_1 VARCHAR(255),\\nLine_2 VARCHAR(255),\\nCity_Town VARCHAR(255),\\nState_County VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Address_ID),\\nUNIQUE (Address_ID)\\n)', 'Products': 'CREATE TABLE Products (\\nProduct_ID VARCHAR(100) NOT NULL,\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nProduct_Description VARCHAR(255),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Product_ID),\\nUNIQUE (Product_ID)\\n)', 'Marketing_Regions': 'CREATE TABLE Marketing_Regions (\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nMarketing_Region_Name VARCHAR(255) NOT NULL,\\nMarketing_Region_Descriptrion VARCHAR(255) NOT NULL,\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Marketing_Region_Code),\\nUNIQUE (Marketing_Region_Code)\\n)', 'Clients': 'CREATE TABLE Clients (\\nClient_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Email_Address VARCHAR(255),\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Client_ID),\\nUNIQUE (Client_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Drama_Workshop_Groups': 'CREATE TABLE Drama_Workshop_Groups (\\nWorkshop_Group_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCurrency_Code CHAR(15) NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Workshop_Group_ID),\\nUNIQUE (Workshop_Group_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Performers': 'CREATE TABLE Performers (\\nPerformer_ID INTEGER NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Performer_ID),\\nUNIQUE (Performer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Customers': 'CREATE TABLE Customers (\\nCustomer_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nCustomer_Name VARCHAR(255),\\nCustomer_Phone VARCHAR(255),\\nCustomer_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Customer_ID),\\nUNIQUE (Customer_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID)\\n)', 'Stores': 'CREATE TABLE Stores (\\nStore_ID VARCHAR(100) NOT NULL,\\nAddress_ID INTEGER NOT NULL,\\nMarketing_Region_Code CHAR(15) NOT NULL,\\nStore_Name VARCHAR(255),\\nStore_Phone VARCHAR(255),\\nStore_Email_Address VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Store_ID),\\nUNIQUE (Store_ID),\\nFOREIGN KEY (Address_ID) REFERENCES Addresses (Address_ID),\\nFOREIGN KEY (Marketing_Region_Code) REFERENCES Marketing_Regions (Marketing_Region_Code)\\n)', 'Bookings': 'CREATE TABLE Bookings (\\nBooking_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nWorkshop_Group_ID VARCHAR(100) NOT NULL,\\nStatus_Code CHAR(15) NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Booking_ID),\\nUNIQUE (Booking_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Clients (Client_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID)\\n)', 'Performers_in_Bookings': 'CREATE TABLE Performers_in_Bookings (\\nOrder_ID INTEGER NOT NULL,\\nPerformer_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Performer_ID),\\nFOREIGN KEY (Performer_ID) REFERENCES Performers (Performer_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID)\\n)', 'Customer_Orders': 'CREATE TABLE Customer_Orders (\\nOrder_ID INTEGER NOT NULL ,\\nCustomer_ID INTEGER NOT NULL,\\nStore_ID INTEGER NOT NULL,\\nOrder_Date DATETIME NOT NULL,\\nPlanned_Delivery_Date DATETIME NOT NULL,\\nActual_Delivery_Date DATETIME NOT NULL,\\nOther_Order_Details VARCHAR(255),\\nPRIMARY KEY (Order_ID),\\nUNIQUE (Order_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Store_ID) REFERENCES Stores (Store_ID)\\n)', 'Order_Items': 'CREATE TABLE Order_Items (\\nOrder_Item_ID INTEGER NOT NULL ,\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Order_Item_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Products (Product_ID)\\n)', 'Invoices': 'CREATE TABLE Invoices (\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\npayment_method_code CHAR(15),\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity VARCHAR(288),\\nOther_Item_Details VARCHAR(255),\\nOrder_Item_ID INTEGER NOT NULL,\\nPRIMARY KEY (Invoice_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Customer_Orders (Order_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (payment_method_code) REFERENCES Ref_Payment_Methods (payment_method_code)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_Type_Code CHAR(15),\\nWorkshop_Group_ID INTEGER NOT NULL,\\nProduct_Description VARCHAR(255),\\nProduct_Name VARCHAR(255),\\nProduct_Price DECIMAL(20,4),\\nOther_Product_Service_Details VARCHAR(255),\\nPRIMARY KEY (Service_ID),\\nUNIQUE (Service_ID),\\nFOREIGN KEY (Workshop_Group_ID) REFERENCES Drama_Workshop_Groups (Workshop_Group_ID),\\nFOREIGN KEY (Service_Type_Code) REFERENCES Ref_Service_Types (Service_Type_Code)\\n)', 'Bookings_Services': 'CREATE TABLE Bookings_Services (\\nOrder_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nPRIMARY KEY (Order_ID, Product_ID),\\nFOREIGN KEY (Order_ID) REFERENCES Bookings (Booking_ID),\\nFOREIGN KEY (Product_ID) REFERENCES Services (Service_ID)\\n)', 'Invoice_Items': 'CREATE TABLE Invoice_Items (\\nInvoice_Item_ID INTEGER NOT NULL ,\\nInvoice_ID INTEGER NOT NULL,\\nOrder_ID INTEGER NOT NULL,\\nOrder_Item_ID INTEGER NOT NULL,\\nProduct_ID INTEGER NOT NULL,\\nOrder_Quantity INTEGER,\\nOther_Item_Details VARCHAR(255),\\nPRIMARY KEY (Invoice_Item_ID),\\nFOREIGN KEY (Order_Item_ID) REFERENCES Order_Items (Order_Item_ID),\\nFOREIGN KEY (Invoice_ID) REFERENCES Invoices (Invoice_ID),\\nFOREIGN KEY (Order_ID, Product_ID) REFERENCES Bookings_Services (Order_ID,Product_ID)\\n)'}\n\n## User-Prompt:\nفي أي مدينة يقع عنوان المتجر المسمى FJA Filming؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Activity': 'CREATE TABLE Activity (\\n actid INTEGER PRIMARY KEY,\\n activity_name varchar(25)\\n)', 'Participates_in': 'CREATE TABLE Participates_in (\\n stuid INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(stuid) REFERENCES Student(StuID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Faculty_Participates_in': 'CREATE TABLE Faculty_Participates_in (\\n FacID INTEGER,\\n actid INTEGER,\\n FOREIGN KEY(FacID) REFERENCES Faculty(FacID),\\n FOREIGN KEY(actid) REFERENCES Activity(actid)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Faculty': 'CREATE TABLE Faculty (\\n FacID \\t INTEGER PRIMARY KEY,\\n Lname\\t\\tVARCHAR(15),\\n Fname\\t\\tVARCHAR(15),\\n Rank\\t\\tVARCHAR(15),\\n Sex\\t\\tVARCHAR(1),\\n Phone\\t\\tINTEGER,\\n Room\\t\\tVARCHAR(5),\\n Building\\t\\tVARCHAR(13)\\n)'}\n\n## User-Prompt:\nكم عدد مساعدي الأساتذة الذكور والإناث لدينا؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Manufacturers': 'CREATE TABLE Manufacturers (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL,\\n Headquarter VARCHAR(255) NOT NULL,\\n Founder VARCHAR(255) NOT NULL,\\n Revenue REAL,\\n PRIMARY KEY (Code) \\n)', 'Products': 'CREATE TABLE Products (\\n Code INTEGER,\\n Name VARCHAR(255) NOT NULL ,\\n Price DECIMAL NOT NULL ,\\n Manufacturer INTEGER NOT NULL,\\n PRIMARY KEY (Code), \\n FOREIGN KEY (Manufacturer) REFERENCES Manufacturers(Code)\\n)'}\n\n## User-Prompt:\nاختر أسماء الشركات المصنعة التي يكون متوسط سعر منتجاتها أعلى من أو يساوي 150 دولارًا.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_name VARCHAR(40),\\nPRIMARY KEY (Customer_ID)\\n)', 'Services': 'CREATE TABLE Services (\\nService_ID INTEGER NOT NULL,\\nService_name VARCHAR(40),\\nPRIMARY KEY (Service_ID)\\n)', 'Available_Policies': 'CREATE TABLE Available_Policies (\\nPolicy_ID INTEGER NOT NULL,\\npolicy_type_code CHAR(15),\\nCustomer_Phone VARCHAR(255),\\nPRIMARY KEY (Policy_ID),\\nUNIQUE (Policy_ID)\\n)', 'Customers_Policies': 'CREATE TABLE Customers_Policies (\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Opened DATE,\\nDate_Closed DATE,\\nPRIMARY KEY (Customer_ID, Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Available_Policies (Policy_ID)\\n)', 'First_Notification_of_Loss': 'CREATE TABLE First_Notification_of_Loss (\\nFNOL_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nService_ID INTEGER NOT NULL,\\nPRIMARY KEY (FNOL_ID),\\nUNIQUE (FNOL_ID),\\nFOREIGN KEY (Service_ID) REFERENCES Services (Service_ID),\\nFOREIGN KEY (Customer_ID, Policy_ID) REFERENCES Customers_Policies (Customer_ID,Policy_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nFNOL_ID INTEGER NOT NULL,\\nEffective_Date DATE,\\nPRIMARY KEY (Claim_ID),\\nUNIQUE (Claim_ID),\\nFOREIGN KEY (FNOL_ID) REFERENCES First_Notification_of_Loss (FNOL_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER,\\nEffective_Date DATE,\\nSettlement_Amount REAL,\\nPRIMARY KEY (Settlement_ID),\\nUNIQUE (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)'}\n\n## User-Prompt:\nكم عدد السياسات المدرجة للعميل بالاسم ديانا روبيل؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Dayana Robel\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'player': 'CREATE TABLE \"player\" (\\n\"Player_ID\" int,\\n\"Sponsor_name\" text,\\n\"Player_name\" text,\\n\"Gender\" text,\\n\"Residence\" text,\\n\"Occupation\" text,\\n\"Votes\" int,\\n\"Rank\" text,\\nPRIMARY KEY (\"Player_ID\")\\n)', 'club': 'CREATE TABLE \"club\" (\\n\"Club_ID\" int,\\n\"Club_name\" text,\\n\"Region\" text,\\n\"Start_year\" int,\\nPRIMARY KEY (\"Club_ID\")\\n)', 'coach': 'CREATE TABLE \"coach\" (\\n\"Coach_ID\" int,\\n\"Coach_name\" text,\\n\"Gender\" text,\\n\"Club_ID\" int,\\n\"Rank\" int,\\nPRIMARY KEY (\"Coach_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)', 'player_coach': 'CREATE TABLE \"player_coach\" (\\n\"Player_ID\" int,\\n\"Coach_ID\" int,\\n\"Starting_year\" int,\\nPRIMARY KEY (\"Player_ID\",\"Coach_ID\"),\\nFOREIGN KEY (`Player_ID`) REFERENCES `player`(`Player_ID`),\\nFOREIGN KEY (`Coach_ID`) REFERENCES `coach`(`Coach_ID`)\\n)', 'match_result': 'CREATE TABLE \"match_result\" (\\n\"Rank\" int,\\n\"Club_ID\" int,\\n\"Gold\" int,\\n\"Big_Silver\" int,\\n\"Small_Silver\" int,\\n\"Bronze\" int,\\n\"Points\" int,\\nPRIMARY KEY (\"Rank\",\"Club_ID\"),\\nFOREIGN KEY (`Club_ID`) REFERENCES `club`(`Club_ID`)\\n)'}\n\n## User-Prompt:\nكم مدرب يمتلك كل نادٍ؟ قائمة معرف النادي والاسم وعدد المدربين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.club_id , T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Movie': 'CREATE TABLE Movie(\\n\\tmID int primary key, \\n\\ttitle text, \\n\\tyear int, \\n\\tdirector text\\n)', 'Reviewer': 'CREATE TABLE Reviewer(\\n\\trID int primary key, \\n\\tname text)', 'Rating': 'CREATE TABLE Rating(\\n\\trID int, \\n\\tmID int, \\n\\tstars int, \\n\\tratingDate date,\\n\\tFOREIGN KEY (mID) references Movie(mID),\\n\\tFOREIGN KEY (rID) references Reviewer(rID)\\n)'}\n\n## User-Prompt:\nما هي أسماء جميع المخرجين الذين أنتجوا فيلمًا واحدً باستثناء المخرج المسمى NULL؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT director FROM Movie WHERE director != \"null\" GROUP BY director HAVING count(*) = 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nقم بسرد تواريخ التسجيل والانتهاء للطالب الذي يحمل اسم Karson.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Fail\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي الأسماء الكاملة والمعرّفات لكل موظف، واسم البلد الذي يتواجدون فيه؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.first_name , T1.last_name , T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Allergy_Type': 'CREATE TABLE Allergy_Type (\\n Allergy \\t\\t VARCHAR(20) PRIMARY KEY,\\n AllergyType \\t VARCHAR(20)\\n)', 'Has_Allergy': 'CREATE TABLE Has_Allergy (\\n StuID \\t\\t INTEGER,\\n Allergy \\t\\t VARCHAR(20),\\n FOREIGN KEY(StuID) REFERENCES Student(StuID),\\n FOREIGN KEY(Allergy) REFERENCES Allergy_Type(Allergy)\\n)', 'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )'}\n\n## User-Prompt:\nأظهر جميع الحساسيات مع عدد الطلاب المتأثرين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'item': 'CREATE TABLE `item` (\\n `i_id` integer NOT NULL\\n, `title` varchar(20) DEFAULT NULL\\n, PRIMARY KEY (`i_id`)\\n)', 'review': 'CREATE TABLE `review` (\\n `a_id` integer NOT NULL PRIMARY KEY\\n, `u_id` integer NOT NULL\\n, `i_id` integer NOT NULL\\n, `rating` integer DEFAULT NULL\\n, `rank` integer DEFAULT NULL\\n, \\tFOREIGN KEY (`u_id`) REFERENCES `useracct`(`u_id`)\\n, \\tFOREIGN KEY (`i_id`) REFERENCES `item`(`i_id`)\\n)', 'useracct': 'CREATE TABLE `useracct` (\\n `u_id` integer NOT NULL\\n, `name` varchar(128) DEFAULT NULL\\n, PRIMARY KEY (`u_id`)\\n)', 'trust': 'CREATE TABLE \"trust\" (`source_u_id` integer NOT NULL, `target_u_id` integer NOT NULL, `trust` integer NOT NULL, FOREIGN KEY (`source_u_id`) REFERENCES `useracct`(`u_id`), FOREIGN KEY (`target_u_id`) REFERENCES `useracct`(`u_id`))'}\n\n## User-Prompt:\nابحث عن اسم المستخدم الذي يعطي أكبر عدد من التقييمات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'regions': 'CREATE TABLE `regions` (\\n `REGION_ID` decimal(5,0) NOT NULL,\\n `REGION_NAME` varchar(25) DEFAULT NULL,\\n PRIMARY KEY (`REGION_ID`)\\n)', 'countries': 'CREATE TABLE `countries` (\\n `COUNTRY_ID` varchar(2) NOT NULL,\\n `COUNTRY_NAME` varchar(40) DEFAULT NULL,\\n `REGION_ID` decimal(10,0) DEFAULT NULL,\\n PRIMARY KEY (`COUNTRY_ID`),\\n FOREIGN KEY (`REGION_ID`) REFERENCES regions (`REGION_ID`)\\n)', 'departments': \"CREATE TABLE `departments` (\\n `DEPARTMENT_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `DEPARTMENT_NAME` varchar(30) NOT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `LOCATION_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`DEPARTMENT_ID`)\\n)\", 'jobs': \"CREATE TABLE `jobs` (\\n `JOB_ID` varchar(10) NOT NULL DEFAULT '',\\n `JOB_TITLE` varchar(35) NOT NULL,\\n `MIN_SALARY` decimal(6,0) DEFAULT NULL,\\n `MAX_SALARY` decimal(6,0) DEFAULT NULL,\\n PRIMARY KEY (`JOB_ID`)\\n)\", 'employees': \"CREATE TABLE `employees` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL DEFAULT '0',\\n `FIRST_NAME` varchar(20) DEFAULT NULL,\\n `LAST_NAME` varchar(25) NOT NULL,\\n `EMAIL` varchar(25) NOT NULL,\\n `PHONE_NUMBER` varchar(20) DEFAULT NULL,\\n `HIRE_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `SALARY` decimal(8,2) DEFAULT NULL,\\n `COMMISSION_PCT` decimal(2,2) DEFAULT NULL,\\n `MANAGER_ID` decimal(6,0) DEFAULT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)\", 'job_history': 'CREATE TABLE `job_history` (\\n `EMPLOYEE_ID` decimal(6,0) NOT NULL,\\n `START_DATE` date NOT NULL,\\n `END_DATE` date NOT NULL,\\n `JOB_ID` varchar(10) NOT NULL,\\n `DEPARTMENT_ID` decimal(4,0) DEFAULT NULL,\\n PRIMARY KEY (`EMPLOYEE_ID`,`START_DATE`),\\n FOREIGN KEY (`EMPLOYEE_ID`) REFERENCES employees(`EMPLOYEE_ID`),\\n FOREIGN KEY (`DEPARTMENT_ID`) REFERENCES departments(`DEPARTMENT_ID`),\\n FOREIGN KEY (`JOB_ID`) REFERENCES jobs(`JOB_ID`)\\n)', 'locations': \"CREATE TABLE `locations` (\\n `LOCATION_ID` decimal(4,0) NOT NULL DEFAULT '0',\\n `STREET_ADDRESS` varchar(40) DEFAULT NULL,\\n `POSTAL_CODE` varchar(12) DEFAULT NULL,\\n `CITY` varchar(30) NOT NULL,\\n `STATE_PROVINCE` varchar(25) DEFAULT NULL,\\n `COUNTRY_ID` varchar(2) DEFAULT NULL,\\n PRIMARY KEY (`LOCATION_ID`),\\n FOREIGN KEY (`COUNTRY_ID`) REFERENCES countries(`COUNTRY_ID`)\\n)\"}\n\n## User-Prompt:\nما هي معرّفات الموظفين لتلك الموظفين الذين شغلوا وظيفتين أو أكثر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'CLASS': 'CREATE TABLE CLASS (\\nCLASS_CODE varchar(5) PRIMARY KEY,\\nCRS_CODE varchar(10),\\nCLASS_SECTION varchar(2),\\nCLASS_TIME varchar(20),\\nCLASS_ROOM varchar(8),\\nPROF_NUM int,\\nFOREIGN KEY (CRS_CODE) REFERENCES COURSE(CRS_CODE)\\nFOREIGN KEY (PROF_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'COURSE': 'CREATE TABLE COURSE (\\nCRS_CODE varchar(10) PRIMARY KEY,\\nDEPT_CODE varchar(10),\\nCRS_DESCRIPTION varchar(35),\\nCRS_CREDIT float(8),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'DEPARTMENT': 'CREATE TABLE DEPARTMENT (\\nDEPT_CODE varchar(10) PRIMARY KEY,\\nDEPT_NAME varchar(30),\\nSCHOOL_CODE varchar(8),\\nEMP_NUM int,\\nDEPT_ADDRESS varchar(20),\\nDEPT_EXTENSION varchar(4),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM)\\n)', 'EMPLOYEE': 'CREATE TABLE EMPLOYEE (\\nEMP_NUM int PRIMARY KEY,\\nEMP_LNAME varchar(15),\\nEMP_FNAME varchar(12),\\nEMP_INITIAL varchar(1),\\nEMP_JOBCODE varchar(5),\\nEMP_HIREDATE datetime,\\nEMP_DOB datetime\\n)', 'ENROLL': 'CREATE TABLE ENROLL (\\nCLASS_CODE varchar(5),\\nSTU_NUM int,\\nENROLL_GRADE varchar(50),\\nFOREIGN KEY (CLASS_CODE) REFERENCES CLASS(CLASS_CODE)\\nFOREIGN KEY (STU_NUM) REFERENCES STUDENT(STU_NUM)\\n)', 'PROFESSOR': 'CREATE TABLE PROFESSOR (\\nEMP_NUM int,\\nDEPT_CODE varchar(10),\\nPROF_OFFICE varchar(50),\\nPROF_EXTENSION varchar(4),\\nPROF_HIGH_DEGREE varchar(5),\\nFOREIGN KEY (EMP_NUM) REFERENCES EMPLOYEE(EMP_NUM),\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)', 'STUDENT': 'CREATE TABLE STUDENT (\\nSTU_NUM int PRIMARY KEY,\\nSTU_LNAME varchar(15),\\nSTU_FNAME varchar(15),\\nSTU_INIT varchar(1),\\nSTU_DOB datetime,\\nSTU_HRS int,\\nSTU_CLASS varchar(2),\\nSTU_GPA float(8),\\nSTU_TRANSFER numeric,\\nDEPT_CODE varchar(18),\\nSTU_PHONE varchar(4),\\nPROF_NUM int,\\nFOREIGN KEY (DEPT_CODE) REFERENCES DEPARTMENT(DEPT_CODE)\\n)'}\n\n## User-Prompt:\nما هي الأسماء الأولى لجميع المدرسين الذين قاموا بتدريس بعض الدورات ورمز الدورة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.emp_fname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Scientists': 'CREATE TABLE Scientists (\\n SSN int,\\n Name Char(30) not null,\\n Primary Key (SSN)\\n)', 'Projects': 'CREATE TABLE Projects (\\n Code Char(4),\\n Name Char(50) not null,\\n Hours int,\\n Primary Key (Code)\\n)', 'AssignedTo': 'CREATE TABLE AssignedTo (\\n Scientist int not null,\\n Project char(4) not null,\\n Primary Key (Scientist, Project),\\n Foreign Key (Scientist) references Scientists (SSN),\\n Foreign Key (Project) references Projects (Code)\\n)'}\n\n## User-Prompt:\nهل يمكنك العثور على اسم وعدد ساعات المشروع الذي يحتوي على أكبر عدد من العلماء؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Songs': 'CREATE TABLE \"Songs\" ( \\n\\t\"SongId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT \\n)', 'Albums': 'CREATE TABLE \"Albums\" ( \\n\\t\"AId\" INTEGER PRIMARY KEY, \\n\\t\"Title\" TEXT, \\n\\t\"Year\" INTEGER, \\n\\t\"Label\" TEXT, \\n\\t\"Type\" TEXT )', 'Band': 'CREATE TABLE \"Band\" ( \\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Firstname\" TEXT, \\n\\t\"Lastname\" TEXT )', 'Instruments': 'CREATE TABLE \"Instruments\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"BandmateId\" INTEGER, \\n\\t\"Instrument\" TEXT ,\\n\\tPRIMARY KEY(SongId, BandmateId, Instrument),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (BandmateId) REFERENCES Band(Id)\\n)', 'Performance': 'CREATE TABLE \"Performance\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"StagePosition\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)', 'Tracklists': 'CREATE TABLE \"Tracklists\" ( \\n\\t\"AlbumId\" INTEGER, \\n\\t\"Position\" INTEGER, \\n\\t\"SongId\" INTEGER ,\\n\\tPRIMARY KEY(AlbumId, Position),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (AlbumId) REFERENCES Albums(AId)\\n)', 'Vocals': 'CREATE TABLE \"Vocals\" ( \\n\\t\"SongId\" INTEGER, \\n\\t\"Bandmate\" INTEGER, \\n\\t\"Type\" TEXT,\\n\\tPRIMARY KEY(SongId, Bandmate),\\n\\tFOREIGN KEY (SongId) REFERENCES Songs(SongId),\\n\\tFOREIGN KEY (Bandmate) REFERENCES Band(Id)\\n)'}\n\n## User-Prompt:\nأي نوع من الأصوات الغنائية قام الموسيقي الذي يحمل الاسم الأخير هيلو بتشغيله بشكل أكبر؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Rank_in_series\" int,\\n\"Number_in_season\" int,\\n\"Title\" text,\\n\"Directed_by\" text,\\n\"Original_air_date\" text,\\n\"Production_code\" text,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'cinema': 'CREATE TABLE \"cinema\" (\\n\"Cinema_ID\" int,\\n\"Name\" text,\\n\"Openning_year\" int,\\n\"Capacity\" int,\\n\"Location\" text,\\nPRIMARY KEY (\"Cinema_ID\"))', 'schedule': 'CREATE TABLE \"schedule\" (\\n\"Cinema_ID\" int,\\n\"Film_ID\" int,\\n\"Date\" text,\\n\"Show_times_per_day\" int,\\n\"Price\" float,\\nPRIMARY KEY (\"Cinema_ID\",\"Film_ID\"),\\nFOREIGN KEY (`Film_ID`) REFERENCES `film`(`Film_ID`),\\nFOREIGN KEY (`Cinema_ID`) REFERENCES `cinema`(`Cinema_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن المواقع التي تحتوي على أكثر من دار عرض واحدة بسعة تزيد عن 300.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'party': 'CREATE TABLE \"party\" (\\n\"Party_ID\" int,\\n\"Party_Theme\" text,\\n\"Location\" text,\\n\"First_year\" text,\\n\"Last_year\" text,\\n\"Number_of_hosts\" int,\\nPRIMARY KEY (\"Party_ID\")\\n)', 'host': 'CREATE TABLE \"host\" (\\n\"Host_ID\" int,\\n\"Name\" text,\\n\"Nationality\" text,\\n\"Age\" text,\\nPRIMARY KEY (\"Host_ID\")\\n)', 'party_host': 'CREATE TABLE \"party_host\" (\\n\"Party_ID\" int,\\n\"Host_ID\" int,\\n\"Is_Main_in_Charge\" bool,\\nPRIMARY KEY (\"Party_ID\",\"Host_ID\"),\\nFOREIGN KEY (\"Host_ID\") REFERENCES `host`(\"Host_ID\"),\\nFOREIGN KEY (\"Party_ID\") REFERENCES `party`(\"Party_ID\")\\n)'}\n\n## User-Prompt:\nأي حفلة كانت لديها أكبر عدد من المضيفين؟ أعطني موقع الحفلة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هو الوصف لنوع الميزانية برمز ORG؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT budget_type_code , budget_type_description FROM Ref_budget_codes\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE Customers (\\nCustomer_ID INTEGER NOT NULL,\\nCustomer_Details VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Customer_ID)\\n)', 'Customer_Policies': 'CREATE TABLE Customer_Policies (\\nPolicy_ID INTEGER NOT NULL,\\nCustomer_ID INTEGER NOT NULL,\\nPolicy_Type_Code CHAR(15) NOT NULL,\\nStart_Date DATE,\\nEnd_Date DATE,\\nPRIMARY KEY (Policy_ID),\\nFOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID)\\n)', 'Claims': 'CREATE TABLE Claims (\\nClaim_ID INTEGER NOT NULL,\\nPolicy_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nPRIMARY KEY (Claim_ID),\\nFOREIGN KEY (Policy_ID) REFERENCES Customer_Policies (Policy_ID)\\n)', 'Settlements': 'CREATE TABLE Settlements (\\nSettlement_ID INTEGER NOT NULL,\\nClaim_ID INTEGER NOT NULL,\\nDate_Claim_Made DATE,\\nDate_Claim_Settled DATE,\\nAmount_Claimed INTEGER,\\nAmount_Settled INTEGER,\\nCustomer_Policy_ID INTEGER NOT NULL,\\nPRIMARY KEY (Settlement_ID),\\nFOREIGN KEY (Claim_ID) REFERENCES Claims (Claim_ID)\\n)', 'Payments': 'CREATE TABLE Payments (\\nPayment_ID INTEGER NOT NULL,\\nSettlement_ID INTEGER NOT NULL,\\nPayment_Method_Code VARCHAR(255),\\nDate_Payment_Made DATE,\\nAmount_Payment INTEGER,\\nPRIMARY KEY (Payment_ID),\\nFOREIGN KEY (Settlement_ID) REFERENCES Settlements (Settlement_ID)\\n)'}\n\n## User-Prompt:\nابحث عن عدد التسويات التي تتوافق مع كل مطالبة. أظهر العدد مع معرف المطالبة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأظهر الهوية، والاسم الأول والأخير لجميع العملاء وعدد الحسابات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nأعطني عنوان عضو الطاقم الذي يحمل الاسم الأول Elsa.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nما هو متوسط العمر لجميع الأشخاص؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM Person WHERE gender = 'female'\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'city': 'CREATE TABLE \"city\" (\\n\"City_ID\" int,\\n\"City\" text,\\n\"Hanzi\" text,\\n\"Hanyu_Pinyin\" text,\\n\"Regional_Population\" int,\\n\"GDP\" real,\\nPRIMARY KEY (\"City_ID\")\\n)', 'match': 'CREATE TABLE \"match\" (\\n\"Match_ID\" int,\\n\"Date\" text,\\n\"Venue\" text,\\n\"Score\" text,\\n\"Result\" text,\\n\"Competition\" text,\\nPRIMARY KEY (\"Match_ID\")\\n)', 'temperature': 'CREATE TABLE \"temperature\" (\\n\"City_ID\" int,\\n\"Jan\" real,\\n\"Feb\" real,\\n\"Mar\" real,\\n\"Apr\" real,\\n\"Jun\" real,\\n\"Jul\" real,\\n\"Aug\" real,\\n\"Sep\" real,\\n\"Oct\" real,\\n\"Nov\" real,\\n\"Dec\" real,\\nPRIMARY KEY (\"City_ID\"),\\nFOREIGN KEY (`City_ID`) REFERENCES `city`(`City_ID`)\\n)', 'hosting_city': 'CREATE TABLE \"hosting_city\" (\\n \"Year\" int,\\n \"Match_ID\" int,\\n \"Host_City\" text,\\n PRIMARY KEY (\"Year\"),\\n FOREIGN KEY (`Host_City`) REFERENCES `city`(`City_ID`),\\n FOREIGN KEY (`Match_ID`) REFERENCES `match`(`Match_ID`)\\n)'}\n\n## User-Prompt:\nاذكر اسم الشخص الأول والاسم الأوسط والاسم الأخير لكل فرد ترتيبها ترتيباً أبجدياً حسب الاسم الأخير.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'all_star': 'CREATE TABLE all_star (\\n player_id TEXT,\\n year INTEGER,\\n game_num INTEGER,\\n game_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n gp NUMERIC,\\n starting_pos NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'appearances': 'CREATE TABLE appearances (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n g_all NUMERIC,\\n gs NUMERIC,\\n g_batting INTEGER,\\n g_defense NUMERIC,\\n g_p INTEGER,\\n g_c INTEGER,\\n g_1b INTEGER,\\n g_2b INTEGER,\\n g_3b INTEGER,\\n g_ss INTEGER,\\n g_lf INTEGER,\\n g_cf INTEGER,\\n g_rf INTEGER,\\n g_of INTEGER,\\n g_dh NUMERIC,\\n g_ph NUMERIC,\\n g_pr NUMERIC,\\n foreign key (team_id) references team(team_id),\\n foreign key (player_id) references player(player_id)\\n)', 'manager_award': 'CREATE TABLE manager_award (\\n player_id TEXT,\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n tie TEXT,\\n notes NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'player_award': 'CREATE TABLE player_award ( \\n\\tplayer_id TEXT, \\n\\taward_id TEXT, \\n\\tyear INTEGER, \\n\\tleague_id TEXT,\\n \\ttie TEXT,\\n \\tnotes TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'manager_award_vote': 'CREATE TABLE manager_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won INTEGER,\\n points_max INTEGER,\\n votes_first INTEGER)', 'player_award_vote': 'CREATE TABLE player_award_vote (\\n award_id TEXT,\\n year INTEGER,\\n league_id TEXT,\\n player_id TEXT,\\n points_won NUMERIC,\\n points_max INTEGER,\\n votes_first NUMERIC,\\n foreign key (player_id) references player(player_id)\\n)', 'batting': 'CREATE TABLE batting ( player_id TEXT, year INTEGER, stint INTEGER, team_id TEXT, league_id TEXT, g INTEGER, ab NUMERIC,\\n r NUMERIC,\\n h NUMERIC,\\n double NUMERIC,\\n triple NUMERIC,\\n hr NUMERIC,\\n rbi NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n bb NUMERIC,\\n so NUMERIC,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\nforeign key (player_id) references player(player_id)\\n)', 'batting_postseason': 'CREATE TABLE batting_postseason (\\n year INTEGER,\\n round TEXT,\\n player_id TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n g INTEGER,\\n ab INTEGER,\\n r INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n rbi INTEGER,\\n sb INTEGER,\\n cs NUMERIC,\\n bb INTEGER,\\n so INTEGER,\\n ibb NUMERIC,\\n hbp NUMERIC,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player_college': 'CREATE TABLE player_college ( player_id TEXT,\\n college_id TEXT,\\n year INTEGER,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (college_id) references college(college_id)\\n)', 'fielding': 'CREATE TABLE fielding (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po NUMERIC,\\n a NUMERIC,\\n e NUMERIC,\\n dp NUMERIC,\\n pb NUMERIC,\\n wp NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n zr NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_outfield': 'CREATE TABLE fielding_outfield (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n glf NUMERIC,\\n gcf NUMERIC,\\n grf NUMERIC,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'fielding_postseason': 'CREATE TABLE fielding_postseason (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n round TEXT,\\n pos TEXT,\\n g INTEGER,\\n gs NUMERIC,\\n inn_outs NUMERIC,\\n po INTEGER,\\n a INTEGER,\\n e INTEGER,\\n dp INTEGER,\\n tp INTEGER,\\n pb NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n\\tforeign key (player_id) references player(player_id),\\n\\tforeign key (team_id) references player(team_id)\\n)', 'hall_of_fame': 'CREATE TABLE hall_of_fame (\\n player_id TEXT,\\n yearid INTEGER,\\n votedby TEXT,\\n ballots NUMERIC,\\n needed NUMERIC,\\n votes NUMERIC,\\n inducted TEXT,\\n category TEXT,\\n needed_note TEXT,\\n\\tforeign key (player_id) references player(player_id)\\n)', 'home_game': 'CREATE TABLE home_game (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n park_id TEXT,\\n span_first TEXT,\\n span_last TEXT,\\n games INTEGER,\\n openings INTEGER,\\n attendance INTEGER,\\n\\tforeign key (team_id) references team(team_id),\\n\\tforeign key (park_id) references park(park_id)\\n)', 'manager': 'CREATE TABLE manager (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank NUMERIC,\\n plyr_mgr TEXT,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'manager_half': 'CREATE TABLE manager_half (\\n player_id TEXT,\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n inseason INTEGER,\\n half INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER,\\n rank INTEGER,\\n\\tforeign key (team_id) references team(team_id)\\n)', 'player': 'CREATE TABLE player (\\n player_id TEXT,\\n birth_year NUMERIC,\\n birth_month NUMERIC,\\n birth_day NUMERIC,\\n birth_country TEXT,\\n birth_state TEXT,\\n birth_city TEXT,\\n death_year NUMERIC,\\n death_month NUMERIC,\\n death_day NUMERIC,\\n death_country TEXT,\\n death_state TEXT,\\n death_city TEXT,\\n name_first TEXT,\\n name_last TEXT,\\n name_given TEXT,\\n weight NUMERIC,\\n height NUMERIC,\\n bats TEXT,\\n throws TEXT,\\n debut TEXT,\\n final_game TEXT,\\n retro_id TEXT,\\n bbref_id TEXT)', 'park': 'CREATE TABLE park (\\n park_id TEXT,\\n park_name TEXT,\\n park_alias TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'pitching': 'CREATE TABLE pitching (\\n player_id TEXT,\\n year INTEGER,\\n stint INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts NUMERIC,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp NUMERIC,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk INTEGER,\\n bfp NUMERIC,\\n gf NUMERIC,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'pitching_postseason': 'CREATE TABLE pitching_postseason (\\n player_id TEXT,\\n year INTEGER,\\n round TEXT,\\n team_id TEXT,\\n league_id TEXT,\\n w INTEGER,\\n l INTEGER,\\n g INTEGER,\\n gs INTEGER,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n h INTEGER,\\n er INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so INTEGER,\\n baopp TEXT,\\n era NUMERIC,\\n ibb NUMERIC,\\n wp NUMERIC,\\n hbp NUMERIC,\\n bk NUMERIC,\\n bfp NUMERIC,\\n gf INTEGER,\\n r INTEGER,\\n sh NUMERIC,\\n sf NUMERIC,\\n g_idp NUMERIC)', 'salary': 'CREATE TABLE salary (\\n year INTEGER,\\n team_id TEXT,\\n league_id TEXT,\\n player_id TEXT,\\n salary INTEGER)', 'college': 'CREATE TABLE college (\\n college_id TEXT,\\n name_full TEXT,\\n city TEXT,\\n state TEXT,\\n country TEXT)', 'postseason': 'CREATE TABLE postseason (\\n year INTEGER,\\n round TEXT,\\n team_id_winner TEXT,\\n league_id_winner TEXT,\\n team_id_loser TEXT,\\n league_id_loser TEXT,\\n wins INTEGER,\\n losses INTEGER,\\n ties INTEGER)', 'team': 'CREATE TABLE team (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n franchise_id TEXT,\\n div_id TEXT,\\n rank INTEGER,\\n g INTEGER,\\n ghome NUMERIC,\\n w INTEGER,\\n l INTEGER,\\n div_win TEXT,\\n wc_win TEXT,\\n lg_win TEXT,\\n ws_win TEXT,\\n r INTEGER,\\n ab INTEGER,\\n h INTEGER,\\n double INTEGER,\\n triple INTEGER,\\n hr INTEGER,\\n bb INTEGER,\\n so NUMERIC,\\n sb NUMERIC,\\n cs NUMERIC,\\n hbp NUMERIC,\\n sf NUMERIC,\\n ra INTEGER,\\n er INTEGER,\\n era NUMERIC,\\n cg INTEGER,\\n sho INTEGER,\\n sv INTEGER,\\n ipouts INTEGER,\\n ha INTEGER,\\n hra INTEGER,\\n bba INTEGER,\\n soa INTEGER,\\n e INTEGER,\\n dp NUMERIC,\\n fp NUMERIC,\\n name TEXT,\\n park TEXT,\\n attendance NUMERIC,\\n bpf INTEGER,\\n ppf INTEGER,\\n team_id_br TEXT,\\n team_id_lahman45 TEXT,\\n team_id_retro TEXT)', 'team_franchise': 'CREATE TABLE team_franchise (\\n franchise_id TEXT,\\n franchise_name TEXT,\\n active TEXT,\\n na_assoc TEXT)', 'team_half': 'CREATE TABLE team_half (\\n year INTEGER,\\n league_id TEXT,\\n team_id TEXT,\\n half INTEGER,\\n div_id TEXT,\\n div_win TEXT,\\n rank INTEGER,\\n g INTEGER,\\n w INTEGER,\\n l INTEGER)'}\n\n## User-Prompt:\nابحث عن الاسم الأول والاسم الأخير والهوية لأفضل ثلاثة لاعبين فازوا بأكبر عدد من جوائز اللاعب.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(20),\\n`customer_last_name` VARCHAR(20),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(255),\\n`customer_email` VARCHAR(255),\\n`other_customer_details` VARCHAR(255)\\n)', 'Customers_Cards': 'CREATE TABLE `Customers_Cards` (\\n`card_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`card_type_code` VARCHAR(15) NOT NULL,\\n`card_number` VARCHAR(80),\\n`date_valid_from` DATETIME,\\n`date_valid_to` DATETIME,\\n`other_card_details` VARCHAR(255)\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`previous_transaction_id` INTEGER,\\n`account_id` INTEGER NOT NULL,\\n`card_id` INTEGER NOT NULL,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DOUBLE NULL,\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`card_id` ) REFERENCES `Customers_Cards`(`card_id` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)'}\n\n## User-Prompt:\nأظهر معرّفات العملاء والأسماء الأولى بدون بطاقة ائتمان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = \"Credit\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n \"Member_ID\" text,\\n \"Name\" text,\\n \"Nationality\" text,\\n \"Role\" text,\\n PRIMARY KEY (\"Member_ID\")\\n)', 'performance': 'CREATE TABLE \"performance\" (\\n \"Performance_ID\" real,\\n \"Date\" text,\\n \"Host\" text,\\n \"Location\" text,\\n \"Attendance\" int,\\n PRIMARY KEY (\"Performance_ID\")\\n)', 'member_attendance': 'CREATE TABLE \"member_attendance\" (\\n \"Member_ID\" int,\\n \"Performance_ID\" int,\\n \"Num_of_Pieces\" int,\\n PRIMARY KEY (\"Member_ID\",\"Performance_ID\"),\\n FOREIGN KEY (\"Member_ID\") REFERENCES `member`(\"Member_ID\"),\\n FOREIGN KEY (\"Performance_ID\") REFERENCES `performance`(\"Performance_ID\")\\n)'}\n\n## User-Prompt:\nعرض تواريخ الأداءات مع الأعضاء الحاضرين الذين لديهم أدوار الكمان.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = \"Violin\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nما هو المتوسط، الحد الأدنى، الأقصى، والمجموع لمبلغ المعاملة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'aircraft': 'CREATE TABLE \"aircraft\" (\\n\"Aircraft_ID\" int,\\n\"Order_Year\" int,\\n\"Manufacturer\" text,\\n\"Model\" text,\\n\"Fleet_Series\" text,\\n\"Powertrain\" text,\\n\"Fuel_Propulsion\" text,\\nPRIMARY KEY (\"Aircraft_ID\")\\n)', 'pilot': 'CREATE TABLE \"pilot\" (\\n\"Pilot_ID\" int,\\n\"Pilot_name\" text,\\n\"Rank\" int,\\n\"Age\" int,\\n\"Nationality\" text,\\n\"Position\" text,\\n\"Join_Year\" int,\\n\"Team\" text,\\nPRIMARY KEY (\"Pilot_ID\")\\n)', 'pilot_record': 'CREATE TABLE \"pilot_record\" (\\n\"Record_ID\" int,\\n\"Pilot_ID\" int,\\n\"Aircraft_ID\" int,\\n\"Date\" text,\\nPRIMARY KEY (\"Pilot_ID\", \"Aircraft_ID\", \"Date\"),\\nFOREIGN KEY (`Pilot_ID`) REFERENCES `pilot`(`Pilot_ID`),\\nFOREIGN KEY (`Aircraft_ID`) REFERENCES `aircraft`(`Aircraft_ID`)\\n)'}\n\n## User-Prompt:\nأظهر الجنسية الأكثر شيوعًا بين الطيارين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'artists': 'CREATE TABLE artists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'sqlite_sequence': 'CREATE TABLE sqlite_sequence(name,seq)', 'albums': 'CREATE TABLE albums\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n title VARCHAR(160) NOT NULL,\\n artist_id INTEGER NOT NULL,\\n FOREIGN KEY (artist_id) REFERENCES artists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'employees': 'CREATE TABLE employees\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n last_name VARCHAR(20) NOT NULL,\\n first_name VARCHAR(20) NOT NULL,\\n title VARCHAR(30),\\n reports_to INTEGER,\\n birth_date TIMESTAMP,\\n hire_date TIMESTAMP,\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60),\\n FOREIGN KEY (reports_to) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'customers': 'CREATE TABLE customers\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n first_name VARCHAR(40) NOT NULL,\\n last_name VARCHAR(20) NOT NULL,\\n company VARCHAR(80),\\n address VARCHAR(70),\\n city VARCHAR(40),\\n state VARCHAR(40),\\n country VARCHAR(40),\\n postal_code VARCHAR(10),\\n phone VARCHAR(24),\\n fax VARCHAR(24),\\n email VARCHAR(60) NOT NULL,\\n support_rep_id INTEGER,\\n FOREIGN KEY (support_rep_id) REFERENCES employees (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'genres': 'CREATE TABLE genres\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'invoices': 'CREATE TABLE invoices\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n customer_id INTEGER NOT NULL,\\n invoice_date TIMESTAMP NOT NULL,\\n billing_address VARCHAR(70),\\n billing_city VARCHAR(40),\\n billing_state VARCHAR(40),\\n billing_country VARCHAR(40),\\n billing_postal_code VARCHAR(10),\\n total NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (customer_id) REFERENCES customers (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'media_types': 'CREATE TABLE media_types\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'tracks': 'CREATE TABLE tracks\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(200) NOT NULL,\\n album_id INTEGER,\\n media_type_id INTEGER NOT NULL,\\n genre_id INTEGER,\\n composer VARCHAR(220),\\n milliseconds INTEGER NOT NULL,\\n bytes INTEGER,\\n unit_price NUMERIC(10,2) NOT NULL,\\n FOREIGN KEY (album_id) REFERENCES albums (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (genre_id) REFERENCES genres (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (media_type_id) REFERENCES media_types (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'invoice_lines': 'CREATE TABLE invoice_lines\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n invoice_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n unit_price NUMERIC(10,2) NOT NULL,\\n quantity INTEGER NOT NULL,\\n FOREIGN KEY (invoice_id) REFERENCES invoices (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)', 'playlists': 'CREATE TABLE playlists\\n(\\n id INTEGER PRIMARY KEY AUTOINCREMENT,\\n name VARCHAR(120)\\n)', 'playlist_tracks': 'CREATE TABLE playlist_tracks\\n(\\n playlist_id INTEGER NOT NULL,\\n track_id INTEGER NOT NULL,\\n CONSTRAINT PK_PlaylistTrack PRIMARY KEY (playlist_id, track_id),\\n FOREIGN KEY (playlist_id) REFERENCES playlists (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION,\\n FOREIGN KEY (track_id) REFERENCES tracks (id)\\n ON DELETE NO ACTION ON UPDATE NO ACTION\\n)'}\n\n## User-Prompt:\nما هو البريد الإلكتروني ورقم الهاتف لعميلة Astrid Gruber؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT email , phone FROM customers WHERE first_name = \"Astrid\" AND last_name = \"Gruber\";\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'genre': 'CREATE TABLE genre(\\n\\tg_name varchar2(20) not null,\\n\\trating varchar2(10),\\n\\tmost_popular_in varchar2(50),\\n\\tprimary key(g_name)\\n)', 'artist': 'CREATE TABLE artist(\\n\\tartist_name varchar2(50) not null,\\n\\tcountry varchar2(20),\\n\\tgender varchar2(20),\\n\\tpreferred_genre varchar2(50),\\n\\tconstraint a_name primary key(artist_name),\\n\\tforeign key(preferred_genre) references genre(g_name) ON DELETE CASCADE\\n)', 'files': 'CREATE TABLE files(\\n\\tf_id number(10) not null,\\n\\tartist_name varchar2(50),\\n\\tfile_size varchar2(20),\\n\\tduration varchar2(20),\\n\\tformats varchar2(20),\\n\\tprimary key(f_id),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE\\n)', 'song': 'CREATE TABLE song(\\n\\tsong_name varchar2(50),\\n\\tartist_name varchar2(50),\\n\\tcountry varchar2(20),\\n\\tf_id number(10),\\n \\tgenre_is varchar2(20),\\n\\trating number(10) check(rating>0 and rating<11),\\n\\tlanguages varchar2(20),\\n\\treleasedate Date, \\n\\tresolution number(10) not null,\\n\\tconstraint s_name primary key(song_name),\\n\\tforeign key(artist_name) references artist(artist_name) ON DELETE CASCADE,\\n\\tforeign key(f_id) references files(f_id) ON DELETE CASCADE,\\n\\tforeign key(genre_is) references genre(g_name) ON DELETE CASCADE\\n)'}\n\n## User-Prompt:\nما هو اسم الفنان، لكل لغة، الذي يمتلك أكثر عدد من الأغاني بدقة أعلى من 500؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'storm': 'CREATE TABLE \"storm\" (\\n\"Storm_ID\" int,\\n\"Name\" text,\\n\"Dates_active\" text,\\n\"Max_speed\" int,\\n\"Damage_millions_USD\" real,\\n\"Number_Deaths\" int,\\nPRIMARY KEY (\"Storm_ID\")\\n)', 'region': 'CREATE TABLE \"region\" (\\n`Region_id` int,\\n`Region_code` text,\\n`Region_name` text,\\nPRIMARY KEY (\"Region_id\")\\n)', 'affected_region': 'CREATE TABLE `affected_region` (\\n`Region_id` int,\\n`Storm_ID` int,\\n`Number_city_affected` real,\\nPRIMARY KEY (`Region_id`,`Storm_ID`),\\nFOREIGN KEY (`Region_id`) REFERENCES `region`(`Region_id`),\\nFOREIGN KEY (`Storm_ID`) REFERENCES `storm`(`Storm_ID`)\\n)'}\n\n## User-Prompt:\nأظهر أسماء جميع المناطق باستثناء الدنمارك.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT region_name FROM region ORDER BY region_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'gymnast': 'CREATE TABLE \"gymnast\" (\\n\"Gymnast_ID\" int,\\n\"Floor_Exercise_Points\" real,\\n\"Pommel_Horse_Points\" real,\\n\"Rings_Points\" real,\\n\"Vault_Points\" real,\\n\"Parallel_Bars_Points\" real,\\n\"Horizontal_Bar_Points\" real,\\n\"Total_Points\" real,\\nPRIMARY KEY (\"Gymnast_ID\"),\\nFOREIGN KEY (\"Gymnast_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\n\"Height\" real,\\n\"Hometown\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nما هي النقاط الإجمالية لجميع الجمبازين، مرتبة حسب النقاط الإجمالية بترتيب تنازلي؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT Total_Points FROM gymnast ORDER BY Total_Points DESC\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Ref_Document_Types': 'CREATE TABLE Ref_Document_Types (\\nDocument_Type_Code CHAR(15) NOT NULL,\\nDocument_Type_Name VARCHAR(255) NOT NULL,\\nDocument_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Document_Type_Code)\\n)', 'Ref_Budget_Codes': 'CREATE TABLE Ref_Budget_Codes (\\nBudget_Type_Code CHAR(15) NOT NULL,\\nBudget_Type_Description VARCHAR(255) NOT NULL,\\nPRIMARY KEY (Budget_Type_Code)\\n)', 'Projects': 'CREATE TABLE Projects (\\nProject_ID INTEGER NOT NULL,\\nProject_Details VARCHAR(255),\\nPRIMARY KEY (Project_ID)\\n)', 'Documents': 'CREATE TABLE Documents (\\nDocument_ID INTEGER NOT NULL,\\nDocument_Type_Code CHAR(15) NOT NULL,\\nProject_ID INTEGER NOT NULL,\\nDocument_Date DATETIME,\\nDocument_Name VARCHAR(255),\\nDocument_Description VARCHAR(255),\\nOther_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Document_Type_Code) REFERENCES Ref_Document_Types (Document_Type_Code),\\nFOREIGN KEY (Project_ID) REFERENCES Projects (Project_ID)\\n)', 'Statements': 'CREATE TABLE Statements (\\nStatement_ID INTEGER NOT NULL,\\nStatement_Details VARCHAR(255),\\nPRIMARY KEY (Statement_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Documents (Document_ID)\\n)', 'Documents_with_Expenses': 'CREATE TABLE Documents_with_Expenses (\\nDocument_ID INTEGER NOT NULL,\\nBudget_Type_Code CHAR(15) NOT NULL,\\nDocument_Details VARCHAR(255),\\nPRIMARY KEY (Document_ID),\\nFOREIGN KEY (Budget_Type_Code) REFERENCES Ref_Budget_Codes (Budget_Type_Code),\\nFOREIGN KEY (Document_ID) REFERENCES Documents (Document_ID)\\n)', 'Accounts': 'CREATE TABLE Accounts (\\nAccount_ID INTEGER NOT NULL,\\nStatement_ID INTEGER NOT NULL,\\nAccount_Details VARCHAR(255),\\nPRIMARY KEY (Account_ID),\\nFOREIGN KEY (Statement_ID) REFERENCES Statements (Statement_ID)\\n)'}\n\n## User-Prompt:\nما هي معرفات المشاريع التي تحتوي على وثيقتين أو أكثر متوافقة؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Student': 'CREATE TABLE Student (\\n StuID INTEGER PRIMARY KEY,\\n LName VARCHAR(12),\\n Fname VARCHAR(12),\\n Age INTEGER,\\n Sex VARCHAR(1),\\n Major INTEGER,\\n Advisor INTEGER,\\n city_code VARCHAR(3)\\n )', 'Dorm': 'CREATE TABLE Dorm (\\n dormid\\t\\tINTEGER,\\n dorm_name\\tVARCHAR(20),\\n student_capacity\\tINTEGER,\\n gender\\t\\t\\tVARCHAR(1)\\n)', 'Dorm_amenity': 'CREATE TABLE Dorm_amenity (\\n amenid\\t\\t\\tINTEGER,\\n amenity_name\\t\\tVARCHAR(25)\\n)', 'Has_amenity': 'CREATE TABLE Has_amenity (\\n dormid\\t\\t\\tINTEGER,\\n amenid\\t\\t\\t\\tINTEGER,\\n\\tFOREIGN KEY (dormid) REFERENCES `Dorm`(dormid),\\n\\tFOREIGN KEY (amenid) REFERENCES `Dorm_amenity`(amenid)\\n)', 'Lives_in': 'CREATE TABLE Lives_in (\\n stuid \\t INTEGER,\\n dormid\\t\\tINTEGER,\\n room_number\\tINTEGER,\\n\\tFOREIGN KEY (stuid) REFERENCES `Student`(StuID),\\n FOREIGN KEY (dormid) REFERENCES `Dorm`(dormid)\\n)'}\n\n## User-Prompt:\nكم عدد طالبات الفتيات اللواتي دون سن 25؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM student WHERE sex = 'F' AND age < 25\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Physician': 'CREATE TABLE Physician (\\n EmployeeID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n SSN INTEGER NOT NULL,\\n CONSTRAINT pk_physician PRIMARY KEY(EmployeeID)\\n)', 'Department': 'CREATE TABLE Department (\\n DepartmentID INTEGER NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Head INTEGER NOT NULL,\\n CONSTRAINT pk_Department PRIMARY KEY(DepartmentID),\\n CONSTRAINT fk_Department_Physician_EmployeeID FOREIGN KEY(Head) REFERENCES Physician(EmployeeID)\\n)', 'Affiliated_With': 'CREATE TABLE Affiliated_With (\\n Physician INTEGER NOT NULL,\\n Department INTEGER NOT NULL,\\n PrimaryAffiliation BOOLEAN NOT NULL,\\n CONSTRAINT fk_Affiliated_With_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Affiliated_With_Department_DepartmentID FOREIGN KEY(Department) REFERENCES Department(DepartmentID),\\n PRIMARY KEY(Physician, Department)\\n)', 'Procedures': 'CREATE TABLE Procedures (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Cost REAL NOT NULL\\n)', 'Trained_In': 'CREATE TABLE Trained_In (\\n Physician INTEGER NOT NULL,\\n Treatment INTEGER NOT NULL,\\n CertificationDate DATETIME NOT NULL,\\n CertificationExpires DATETIME NOT NULL,\\n CONSTRAINT fk_Trained_In_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Trained_In_Procedures_Code FOREIGN KEY(Treatment) REFERENCES Procedures(Code),\\n PRIMARY KEY(Physician, Treatment)\\n)', 'Patient': 'CREATE TABLE Patient (\\n SSN INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Address VARCHAR(30) NOT NULL,\\n Phone VARCHAR(30) NOT NULL,\\n InsuranceID INTEGER NOT NULL,\\n PCP INTEGER NOT NULL,\\n CONSTRAINT fk_Patient_Physician_EmployeeID FOREIGN KEY(PCP) REFERENCES Physician(EmployeeID)\\n)', 'Nurse': 'CREATE TABLE Nurse (\\n EmployeeID INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Position VARCHAR(30) NOT NULL,\\n Registered BOOLEAN NOT NULL,\\n SSN INTEGER NOT NULL\\n)', 'Appointment': 'CREATE TABLE Appointment (\\n AppointmentID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL, \\n PrepNurse INTEGER,\\n Physician INTEGER NOT NULL,\\n Start DATETIME NOT NULL,\\n End DATETIME NOT NULL,\\n ExaminationRoom TEXT NOT NULL,\\n CONSTRAINT fk_Appointment_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Appointment_Nurse_EmployeeID FOREIGN KEY(PrepNurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_Appointment_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID)\\n)', 'Medication': 'CREATE TABLE Medication (\\n Code INTEGER PRIMARY KEY NOT NULL,\\n Name VARCHAR(30) NOT NULL,\\n Brand VARCHAR(30) NOT NULL,\\n Description VARCHAR(30) NOT NULL\\n)', 'Prescribes': 'CREATE TABLE Prescribes (\\n Physician INTEGER NOT NULL,\\n Patient INTEGER NOT NULL, \\n Medication INTEGER NOT NULL, \\n Date DATETIME NOT NULL,\\n Appointment INTEGER, \\n Dose VARCHAR(30) NOT NULL,\\n PRIMARY KEY(Physician, Patient, Medication, Date),\\n CONSTRAINT fk_Prescribes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Prescribes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Prescribes_Medication_Code FOREIGN KEY(Medication) REFERENCES Medication(Code),\\n CONSTRAINT fk_Prescribes_Appointment_AppointmentID FOREIGN KEY(Appointment) REFERENCES Appointment(AppointmentID)\\n)', 'Block': 'CREATE TABLE Block (\\n BlockFloor INTEGER NOT NULL,\\n BlockCode INTEGER NOT NULL,\\n PRIMARY KEY(BlockFloor, BlockCode)\\n)', 'Room': 'CREATE TABLE Room (\\n RoomNumber INTEGER PRIMARY KEY NOT NULL,\\n RoomType VARCHAR(30) NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL, \\n Unavailable BOOLEAN NOT NULL,\\n CONSTRAINT fk_Room_Block_PK FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode)\\n)', 'On_Call': 'CREATE TABLE On_Call (\\n Nurse INTEGER NOT NULL,\\n BlockFloor INTEGER NOT NULL, \\n BlockCode INTEGER NOT NULL,\\n OnCallStart DATETIME NOT NULL,\\n OnCallEnd DATETIME NOT NULL,\\n PRIMARY KEY(Nurse, BlockFloor, BlockCode, OnCallStart, OnCallEnd),\\n CONSTRAINT fk_OnCall_Nurse_EmployeeID FOREIGN KEY(Nurse) REFERENCES Nurse(EmployeeID),\\n CONSTRAINT fk_OnCall_Block_Floor FOREIGN KEY(BlockFloor, BlockCode) REFERENCES Block(BlockFloor, BlockCode) \\n)', 'Stay': 'CREATE TABLE Stay (\\n StayID INTEGER PRIMARY KEY NOT NULL,\\n Patient INTEGER NOT NULL,\\n Room INTEGER NOT NULL,\\n StayStart DATETIME NOT NULL,\\n StayEnd DATETIME NOT NULL,\\n CONSTRAINT fk_Stay_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Stay_Room_Number FOREIGN KEY(Room) REFERENCES Room(RoomNumber)\\n)', 'Undergoes': 'CREATE TABLE Undergoes (\\n Patient INTEGER NOT NULL,\\n Procedures INTEGER NOT NULL,\\n Stay INTEGER NOT NULL,\\n DateUndergoes DATETIME NOT NULL,\\n Physician INTEGER NOT NULL,\\n AssistingNurse INTEGER,\\n PRIMARY KEY(Patient, Procedures, Stay, DateUndergoes),\\n CONSTRAINT fk_Undergoes_Patient_SSN FOREIGN KEY(Patient) REFERENCES Patient(SSN),\\n CONSTRAINT fk_Undergoes_Procedures_Code FOREIGN KEY(Procedures) REFERENCES Procedures(Code),\\n CONSTRAINT fk_Undergoes_Stay_StayID FOREIGN KEY(Stay) REFERENCES Stay(StayID),\\n CONSTRAINT fk_Undergoes_Physician_EmployeeID FOREIGN KEY(Physician) REFERENCES Physician(EmployeeID),\\n CONSTRAINT fk_Undergoes_Nurse_EmployeeID FOREIGN KEY(AssistingNurse) REFERENCES Nurse(EmployeeID)\\n)'}\n\n## User-Prompt:\nحساب السعر المتوسط للإجراءات التي تم تدريب الطبيب جون وين فيها.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Campuses': 'CREATE TABLE \"Campuses\" (\\n\\t\"Id\" INTEGER PRIMARY KEY, \\n\\t\"Campus\" TEXT, \\n\\t\"Location\" TEXT, \\n\\t\"County\" TEXT, \\n\\t\"Year\" INTEGER \\n)', 'csu_fees': 'CREATE TABLE \"csu_fees\" ( \\n\\t\"Campus\" INTEGER PRIMARY KEY, \\n\\t\"Year\" INTEGER, \\n\\t\"CampusFee\" INTEGER,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'degrees': 'CREATE TABLE \"degrees\" ( \\n\\t\"Year\" INTEGER,\\n\\t\"Campus\" INTEGER, \\n\\t\"Degrees\" INTEGER,\\n\\tPRIMARY KEY (Year, Campus),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'discipline_enrollments': 'CREATE TABLE \"discipline_enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Discipline\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Undergraduate\" INTEGER, \\n\\t\"Graduate\" INTEGER,\\n\\tPRIMARY KEY (Campus, Discipline),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'enrollments': 'CREATE TABLE \"enrollments\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"TotalEnrollment_AY\" INTEGER, \\n\\t\"FTE_AY\" INTEGER,\\n\\tPRIMARY KEY(Campus, Year),\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id)\\n)', 'faculty': 'CREATE TABLE \"faculty\" ( \\n\\t\"Campus\" INTEGER, \\n\\t\"Year\" INTEGER, \\n\\t\"Faculty\" REAL,\\n\\tFOREIGN KEY (Campus) REFERENCES Campuses(Id) \\n)'}\n\n## User-Prompt:\nكم حرم جامعي موجود في مقاطعة لوس أنجلوس؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'ACCOUNTS': 'CREATE TABLE ACCOUNTS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n name VARCHAR(64) NOT NULL\\n)', 'SAVINGS': 'CREATE TABLE SAVINGS (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)', 'CHECKING': 'CREATE TABLE CHECKING (\\n custid BIGINT NOT NULL PRIMARY KEY,\\n balance FLOAT NOT NULL,\\n FOREIGN KEY (custid) REFERENCES ACCOUNTS (custid)\\n)'}\n\n## User-Prompt:\nما هي الأسماء، ورصيد الفحص، ورصيد الادخار لجميع الحسابات في البنك؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'product': 'CREATE TABLE \"product\" (\\n\"product_id\" int,\\n\"product\" text,\\n\"dimensions\" text,\\n\"dpi\" real,\\n\"pages_per_minute_color\" real,\\n\"max_page_size\" text,\\n\"interface\" text,\\nPRIMARY KEY (\"product_id\")\\n)', 'store': 'CREATE TABLE \"store\" (\\n\"Store_ID\" int,\\n\"Store_Name\" text,\\n\"Type\" text,\\n\"Area_size\" real,\\n\"Number_of_product_category\" real,\\n\"Ranking\" int,\\nPRIMARY KEY (\"Store_ID\")\\n)', 'district': 'CREATE TABLE \"district\" (\\n\"District_ID\" int,\\n\"District_name\" text,\\n\"Headquartered_City\" text,\\n\"City_Population\" real,\\n\"City_Area\" real,\\nPRIMARY KEY (\"District_ID\")\\n)', 'store_product': 'CREATE TABLE \"store_product\" (\\n\"Store_ID\" int,\\n\"Product_ID\" int,\\nPRIMARY KEY (\"Store_ID\",\"Product_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`Product_ID`) REFERENCES `product`(`Product_ID`)\\n)', 'store_district': 'CREATE TABLE \"store_district\" (\\n\"Store_ID\" int,\\n\"District_ID\" int,\\nPRIMARY KEY (\"Store_ID\"),\\nFOREIGN KEY (`Store_ID`) REFERENCES `store`(`Store_ID`),\\nFOREIGN KEY (`District_ID`) REFERENCES `district`(`District_ID`)\\n)'}\n\n## User-Prompt:\nابحث عن المنتجات التي يكون لديها أقصى حجم للصفحة A4 أو عدد الصفحات باللون في الدقيقة أقل من 5.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT product FROM product WHERE max_page_size = \"A4\" AND pages_per_minute_color < 5\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'gymnast': 'CREATE TABLE \"gymnast\" (\\n\"Gymnast_ID\" int,\\n\"Floor_Exercise_Points\" real,\\n\"Pommel_Horse_Points\" real,\\n\"Rings_Points\" real,\\n\"Vault_Points\" real,\\n\"Parallel_Bars_Points\" real,\\n\"Horizontal_Bar_Points\" real,\\n\"Total_Points\" real,\\nPRIMARY KEY (\"Gymnast_ID\"),\\nFOREIGN KEY (\"Gymnast_ID\") REFERENCES \"people\"(\"People_ID\")\\n)', 'people': 'CREATE TABLE \"people\" (\\n\"People_ID\" int,\\n\"Name\" text,\\n\"Age\" real,\\n\"Height\" real,\\n\"Hometown\" text,\\nPRIMARY KEY (\"People_ID\")\\n)'}\n\n## User-Prompt:\nارجاع المتوسط ​​العمري عبر جميع الجمبازين.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'film': 'CREATE TABLE \"film\" (\\n\"Film_ID\" int,\\n\"Title\" text,\\n\"Studio\" text,\\n\"Director\" text,\\n\"Gross_in_dollar\" int,\\nPRIMARY KEY (\"Film_ID\")\\n)', 'market': 'CREATE TABLE \"market\" (\\n\"Market_ID\" int,\\n\"Country\" text,\\n\"Number_cities\" int,\\nPRIMARY KEY (\"Market_ID\")\\n)', 'film_market_estimation': 'CREATE TABLE \"film_market_estimation\" (\\n\"Estimation_ID\" int,\\n\"Low_Estimate\" real,\\n\"High_Estimate\" real,\\n\"Film_ID\" int,\\n\"Type\" text,\\n\"Market_ID\" int,\\n\"Year\" int,\\nPRIMARY KEY (\"Estimation_ID\"),\\nFOREIGN KEY (\"Film_ID\") REFERENCES film(\"Film_ID\"),\\nFOREIGN KEY (\"Market_ID\") REFERENCES market(\"Market_ID\")\\n)'}\n\n## User-Prompt:\nعدد الأسواق التي يكون فيها عدد المدن أقل من 300.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT count(*) FROM market WHERE Number_cities < 300\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'member': 'CREATE TABLE \"member\" (\\n\"Member_ID\" int,\\n\"Card_Number\" text,\\n\"Name\" text,\\n\"Hometown\" text,\\n\"Level\" int,\\nPRIMARY KEY (\"Member_ID\")\\n)', 'branch': 'CREATE TABLE \"branch\" (\\n\"Branch_ID\" int,\\n\"Name\" text,\\n\"Open_year\" text,\\n\"Address_road\" text,\\n\"City\" text,\\n\"membership_amount\" text,\\nPRIMARY KEY (\"Branch_ID\")\\n)', 'membership_register_branch': 'CREATE TABLE \"membership_register_branch\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Register_Year\" text,\\nPRIMARY KEY (\"Member_ID\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)', 'purchase': 'CREATE TABLE \"purchase\" (\\n\"Member_ID\" int,\\n\"Branch_ID\" text,\\n\"Year\" text,\\n\"Total_pounds\" real,\\nPRIMARY KEY (\"Member_ID\",\"Branch_ID\",\"Year\"),\\nFOREIGN KEY (\"Member_ID\") REFERENCES \"member\"(\"Member_ID\"),\\nFOREIGN KEY (\"Branch_ID\") REFERENCES \"branch\"(\"Branch_ID\")\\n)'}\n\n## User-Prompt:\nما هي المدن التي لا تحتوي على أي فروع تحتوي على أكثر من 100 عضو؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'flight': 'CREATE TABLE flight(\\n\\tflno number(4,0) primary key,\\n\\torigin varchar2(20),\\n\\tdestination varchar2(20),\\n\\tdistance number(6,0),\\n\\tdeparture_date date,\\n\\tarrival_date date,\\n\\tprice number(7,2),\\n aid number(9,0),\\n foreign key(\"aid\") references `aircraft`(\"aid\"))', 'aircraft': 'CREATE TABLE aircraft(\\n\\taid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tdistance number(6,0))', 'employee': 'CREATE TABLE employee(\\n\\teid number(9,0) primary key,\\n\\tname varchar2(30),\\n\\tsalary number(10,2))', 'certificate': 'CREATE TABLE certificate(\\n\\teid number(9,0),\\n\\taid number(9,0),\\n\\tprimary key(eid,aid),\\n\\tforeign key(\"eid\") references `employee`(\"eid\"),\\n\\tforeign key(\"aid\") references `aircraft`(\"aid\"))'}\n\n## User-Prompt:\nأظهر رقم الرحلة والمسافة للرحلة ذات السعر الأعلى.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Course_Authors_and_Tutors': 'CREATE TABLE `Course_Authors_and_Tutors` (\\n`author_id` INTEGER PRIMARY KEY,\\n`author_tutor_ATB` VARCHAR(3),\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(40),\\n`personal_name` VARCHAR(80),\\n`middle_name` VARCHAR(80),\\n`family_name` VARCHAR(80),\\n`gender_mf` VARCHAR(1),\\n`address_line_1` VARCHAR(80)\\n)', 'Students': 'CREATE TABLE `Students` (\\n`student_id` INTEGER PRIMARY KEY,\\n`date_of_registration` DATETIME,\\n`date_of_latest_logon` DATETIME,\\n`login_name` VARCHAR(40),\\n`password` VARCHAR(10),\\n`personal_name` VARCHAR(40),\\n`middle_name` VARCHAR(40),\\n`family_name` VARCHAR(40)\\n)', 'Subjects': 'CREATE TABLE `Subjects` (\\n`subject_id` INTEGER PRIMARY KEY,\\n`subject_name` VARCHAR(120)\\n)', 'Courses': 'CREATE TABLE `Courses` (\\n`course_id` INTEGER PRIMARY KEY,\\n`author_id` INTEGER NOT NULL,\\n`subject_id` INTEGER NOT NULL,\\n`course_name` VARCHAR(120),\\n`course_description` VARCHAR(255),\\nFOREIGN KEY (`author_id` ) REFERENCES `Course_Authors_and_Tutors`(`author_id` ),\\nFOREIGN KEY (`subject_id` ) REFERENCES `Subjects`(`subject_id` )\\n)', 'Student_Course_Enrolment': 'CREATE TABLE `Student_Course_Enrolment` (\\n`registration_id` INTEGER PRIMARY KEY,\\n`student_id` INTEGER NOT NULL,\\n`course_id` INTEGER NOT NULL,\\n`date_of_enrolment` DATETIME NOT NULL,\\n`date_of_completion` DATETIME NOT NULL,\\nFOREIGN KEY (`course_id` ) REFERENCES `Courses`(`course_id` ),\\nFOREIGN KEY (`student_id` ) REFERENCES `Students`(`student_id` )\\n)', 'Student_Tests_Taken': 'CREATE TABLE `Student_Tests_Taken` (\\n`registration_id` INTEGER NOT NULL,\\n`date_test_taken` DATETIME NOT NULL,\\n`test_result` VARCHAR(255),\\nFOREIGN KEY (`registration_id` ) REFERENCES `Student_Course_Enrolment`(`registration_id` )\\n)'}\n\n## User-Prompt:\nقائمة بأسماء الدورات وعدد الطلاب المسجلين في كل دورة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'actor': 'CREATE TABLE actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id)\\n)', 'address': 'CREATE TABLE address (\\n address_id SMALLINT UNSIGNED NOT NULL,\\n address VARCHAR(50) NOT NULL,\\n address2 VARCHAR(50) DEFAULT NULL,\\n district VARCHAR(20) NOT NULL,\\n city_id SMALLINT UNSIGNED NOT NULL,\\n postal_code VARCHAR(10) DEFAULT NULL,\\n phone VARCHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (address_id),\\n FOREIGN KEY (city_id) REFERENCES city (city_id)\\n)', 'category': 'CREATE TABLE category (\\n category_id TINYINT UNSIGNED NOT NULL,\\n name VARCHAR(25) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (category_id)\\n)', 'city': 'CREATE TABLE city (\\n city_id SMALLINT UNSIGNED NOT NULL,\\n city VARCHAR(50) NOT NULL,\\n country_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (city_id),\\n FOREIGN KEY (country_id) REFERENCES country (country_id)\\n)', 'country': 'CREATE TABLE country (\\n country_id SMALLINT UNSIGNED NOT NULL,\\n country VARCHAR(50) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (country_id)\\n)', 'customer': 'CREATE TABLE customer (\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n create_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (customer_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id)\\n)', 'film': \"CREATE TABLE film (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT DEFAULT NULL,\\n release_year YEAR DEFAULT NULL,\\n language_id TINYINT UNSIGNED NOT NULL,\\n original_language_id TINYINT UNSIGNED DEFAULT NULL,\\n rental_duration TINYINT UNSIGNED NOT NULL DEFAULT 3,\\n rental_rate DECIMAL(4,2) NOT NULL DEFAULT 4.99,\\n length SMALLINT UNSIGNED DEFAULT NULL,\\n replacement_cost DECIMAL(5,2) NOT NULL DEFAULT 19.99,\\n rating DEFAULT 'G',\\n special_features DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id),\\n FOREIGN KEY (language_id) REFERENCES language (language_id),\\n FOREIGN KEY (original_language_id) REFERENCES language (language_id)\\n)\", 'film_actor': 'CREATE TABLE film_actor (\\n actor_id SMALLINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (actor_id,film_id),\\n FOREIGN KEY (actor_id) REFERENCES actor (actor_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'film_category': 'CREATE TABLE film_category (\\n film_id SMALLINT UNSIGNED NOT NULL,\\n category_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (film_id, category_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id),\\n FOREIGN KEY (category_id) REFERENCES category (category_id)\\n)', 'film_text': 'CREATE TABLE film_text (\\n film_id SMALLINT NOT NULL,\\n title VARCHAR(255) NOT NULL,\\n description TEXT,\\n PRIMARY KEY (film_id)\\n)', 'inventory': 'CREATE TABLE inventory (\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n film_id SMALLINT UNSIGNED NOT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (inventory_id),\\n FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (film_id) REFERENCES film (film_id)\\n)', 'language': 'CREATE TABLE language (\\n language_id TINYINT UNSIGNED NOT NULL,\\n name CHAR(20) NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (language_id)\\n)', 'payment': 'CREATE TABLE payment (\\n payment_id SMALLINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n rental_id INT DEFAULT NULL,\\n amount DECIMAL(5,2) NOT NULL,\\n payment_date DATETIME NOT NULL,\\n last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (payment_id),\\n FOREIGN KEY (rental_id) REFERENCES rental (rental_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id)\\n)', 'rental': 'CREATE TABLE rental (\\n rental_id INT NOT NULL,\\n rental_date DATETIME NOT NULL,\\n inventory_id MEDIUMINT UNSIGNED NOT NULL,\\n customer_id SMALLINT UNSIGNED NOT NULL,\\n return_date DATETIME DEFAULT NULL,\\n staff_id TINYINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (rental_id),\\n FOREIGN KEY (staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id),\\n FOREIGN KEY (customer_id) REFERENCES customer (customer_id)\\n)', 'staff': 'CREATE TABLE staff (\\n staff_id TINYINT UNSIGNED NOT NULL,\\n first_name VARCHAR(45) NOT NULL,\\n last_name VARCHAR(45) NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n picture BLOB DEFAULT NULL,\\n email VARCHAR(50) DEFAULT NULL,\\n store_id TINYINT UNSIGNED NOT NULL,\\n active BOOLEAN NOT NULL DEFAULT TRUE,\\n username VARCHAR(16) NOT NULL,\\n password VARCHAR(40) DEFAULT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (staff_id),\\n --FOREIGN KEY (store_id) REFERENCES store (store_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)', 'store': 'CREATE TABLE store (\\n store_id TINYINT UNSIGNED NOT NULL,\\n manager_staff_id TINYINT UNSIGNED NOT NULL,\\n address_id SMALLINT UNSIGNED NOT NULL,\\n last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\\n PRIMARY KEY (store_id),\\n FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id),\\n FOREIGN KEY (address_id) REFERENCES address (address_id)\\n)'}\n\n## User-Prompt:\nما هي عنوان الفيلم ومعرفه الذي يتمتع بسعر تأجير قدره 0.99 ويكون المخزون أقل من 3؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Person': 'CREATE TABLE Person (\\n name varchar(20) PRIMARY KEY,\\n age INTEGER,\\n city TEXT,\\n gender TEXT,\\n job TEXT\\n)', 'PersonFriend': 'CREATE TABLE PersonFriend (\\n name varchar(20),\\n friend varchar(20),\\n year INTEGER,\\n FOREIGN KEY (name) REFERENCES Person(name),\\n FOREIGN KEY (friend) REFERENCES Person(name)\\n)'}\n\n## User-Prompt:\nكم عدد الأشخاص الذين تزيد أعمارهم عن 30 عامًا ويكونون مهنة هندسية؟\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT name FROM Person WHERE age < 30\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_first_name` VARCHAR(50),\\n`customer_middle_initial` VARCHAR(1),\\n`customer_last_name` VARCHAR(50),\\n`gender` VARCHAR(1),\\n`email_address` VARCHAR(255),\\n`login_name` VARCHAR(80),\\n`login_password` VARCHAR(20),\\n`phone_number` VARCHAR(255),\\n`town_city` VARCHAR(50),\\n`state_county_province` VARCHAR(50),\\n`country` VARCHAR(50)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_date` DATETIME,\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Accounts': 'CREATE TABLE `Accounts` (\\n`account_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`date_account_opened` DATETIME,\\n`account_name` VARCHAR(50),\\n`other_account_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Product_Categories': 'CREATE TABLE `Product_Categories` (\\n`production_type_code` VARCHAR(15) PRIMARY KEY,\\n`product_type_description` VARCHAR(80),\\n`vat_rating` DECIMAL(19,4)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`parent_product_id` INTEGER,\\n`production_type_code` VARCHAR(15) NOT NULL,\\n`unit_price` DECIMAL(19,4),\\n`product_name` VARCHAR(80),\\n`product_color` VARCHAR(20),\\n`product_size` VARCHAR(20),\\nFOREIGN KEY (`production_type_code` ) REFERENCES `Product_Categories`(`production_type_code` )\\n)', 'Financial_Transactions': 'CREATE TABLE `Financial_Transactions` (\\n`transaction_id` INTEGER NOT NULL ,\\n`account_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER,\\n`transaction_type` VARCHAR(15) NOT NULL,\\n`transaction_date` DATETIME,\\n`transaction_amount` DECIMAL(19,4),\\n`transaction_comment` VARCHAR(255),\\n`other_transaction_details` VARCHAR(255),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`account_id` ) REFERENCES `Accounts`(`account_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_quantity` VARCHAR(50),\\n`other_order_item_details` VARCHAR(255),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` ),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` )\\n)', 'Invoice_Line_Items': 'CREATE TABLE `Invoice_Line_Items` (\\n`order_item_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\n`product_title` VARCHAR(80),\\n`product_quantity` VARCHAR(50),\\n`product_price` DECIMAL(19,4),\\n`derived_product_cost` DECIMAL(19,4),\\n`derived_vat_payable` DECIMAL(19,4),\\n`derived_total_cost` DECIMAL(19,4),\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)'}\n\n## User-Prompt:\nأظهر جميع أحجام المنتجات.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT DISTINCT product_size FROM Products\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`customer_name` VARCHAR(80),\\n`customer_details` VARCHAR(255)\\n)', 'Invoices': 'CREATE TABLE `Invoices` (\\n`invoice_number` INTEGER PRIMARY KEY,\\n`invoice_date` DATETIME,\\n`invoice_details` VARCHAR(255)\\n)', 'Orders': 'CREATE TABLE `Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status` VARCHAR(10) NOT NULL,\\n`date_order_placed` DATETIME NOT NULL,\\n`order_details` VARCHAR(255),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_name` VARCHAR(80),\\n`product_details` VARCHAR(255)\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`product_id` INTEGER NOT NULL,\\n`order_id` INTEGER NOT NULL,\\n`order_item_status` VARCHAR(10) NOT NULL,\\n`order_item_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Shipments': 'CREATE TABLE `Shipments` (\\n`shipment_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`invoice_number` INTEGER NOT NULL,\\n`shipment_tracking_number` VARCHAR(80),\\n`shipment_date` DATETIME,\\n`other_shipment_details` VARCHAR(255),\\nFOREIGN KEY (`order_id` ) REFERENCES `Orders`(`order_id` ),\\nFOREIGN KEY (`invoice_number` ) REFERENCES `Invoices`(`invoice_number` )\\n)', 'Shipment_Items': 'CREATE TABLE `Shipment_Items` (\\n`shipment_id` INTEGER NOT NULL,\\n`order_item_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_item_id` ) REFERENCES `Order_Items`(`order_item_id` ),\\nFOREIGN KEY (`shipment_id` ) REFERENCES `Shipments`(`shipment_id` )\\n)'}\n\n## User-Prompt:\nسجل أسماء العملاء الذين قاموا بإلغاء شراء المنتج 'food' مرة واحدة على الأقل (حالة العنصر 'Cancel').\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1\n```", "history": []}, {"system": "You are a highly advanced Arabic text-to-SQL converter. Your mission is to accurately transform Arabic natural language queries into SQL queries with precision and clarity.\n\nInstructions:\n1. **Comprehensive Analysis:** Carefully parse the Arabic query to extract context, intent, and key parameters.\n2. **Schema Utilization:** Leverage the provided DB-Schema to understand table relationships, column names, data types, and constraints.\n3. **Precise Output:** Generate a syntactically correct SQL query that exactly reflects the query logic. Enclose the final SQL query within a markdown code block marked with ```sql.\n4. **No Extraneous Text:** Provide only the SQL query without any additional commentary or explanations.\n5. **Ambiguity Resolution:** In cases of uncertainty, default to the most direct and straightforward interpretation.\n6. **Identity Protocol:** If asked for your name, respond with `DB Chat by Eng. OsamaM0`.\n7. **Validation:** Ensure that the generated SQL query adheres to standard SQL syntax and accurately captures the requirements expressed in the Arabic query.\n8. **Strict Formatting:** Maintain the provided structure, ensuring consistency, clarity, and error-free output.", "instruction": "## DB-Schema:\n{'Addresses': 'CREATE TABLE `Addresses` (\\n`address_id` INTEGER PRIMARY KEY,\\n`address_details` VARCHAR(255)\\n)', 'Staff': 'CREATE TABLE `Staff` (\\n`staff_id` INTEGER PRIMARY KEY,\\n`staff_gender` VARCHAR(1),\\n`staff_name` VARCHAR(80)\\n)', 'Suppliers': 'CREATE TABLE `Suppliers` (\\n`supplier_id` INTEGER PRIMARY KEY,\\n`supplier_name` VARCHAR(80),\\n`supplier_phone` VARCHAR(80)\\n)', 'Department_Store_Chain': 'CREATE TABLE `Department_Store_Chain` (\\n`dept_store_chain_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_name` VARCHAR(80)\\n)', 'Customers': 'CREATE TABLE `Customers` (\\n`customer_id` INTEGER PRIMARY KEY,\\n`payment_method_code` VARCHAR(10) NOT NULL,\\n`customer_code` VARCHAR(20),\\n`customer_name` VARCHAR(80),\\n`customer_address` VARCHAR(255),\\n`customer_phone` VARCHAR(80),\\n`customer_email` VARCHAR(80)\\n)', 'Products': 'CREATE TABLE `Products` (\\n`product_id` INTEGER PRIMARY KEY,\\n`product_type_code` VARCHAR(10) NOT NULL,\\n`product_name` VARCHAR(80),\\n`product_price` DECIMAL(19,4)\\n)', 'Supplier_Addresses': 'CREATE TABLE `Supplier_Addresses` (\\n`supplier_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`supplier_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` )\\n)', 'Customer_Addresses': 'CREATE TABLE `Customer_Addresses` (\\n`customer_id` INTEGER NOT NULL,\\n`address_id` INTEGER NOT NULL,\\n`date_from` DATETIME NOT NULL,\\n`date_to` DATETIME,\\nPRIMARY KEY (`customer_id`, `address_id`),\\nFOREIGN KEY (`address_id` ) REFERENCES `Addresses`(`address_id` ),\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Customer_Orders': 'CREATE TABLE `Customer_Orders` (\\n`order_id` INTEGER PRIMARY KEY,\\n`customer_id` INTEGER NOT NULL,\\n`order_status_code` VARCHAR(10) NOT NULL,\\n`order_date` DATETIME NOT NULL,\\nFOREIGN KEY (`customer_id` ) REFERENCES `Customers`(`customer_id` )\\n)', 'Department_Stores': 'CREATE TABLE `Department_Stores` (\\n`dept_store_id` INTEGER PRIMARY KEY,\\n`dept_store_chain_id` INTEGER,\\n`store_name` VARCHAR(80),\\n`store_address` VARCHAR(255),\\n`store_phone` VARCHAR(80),\\n`store_email` VARCHAR(80),\\nFOREIGN KEY (`dept_store_chain_id` ) REFERENCES `Department_Store_Chain`(`dept_store_chain_id` )\\n)', 'Departments': 'CREATE TABLE `Departments` (\\n`department_id` INTEGER PRIMARY KEY,\\n`dept_store_id` INTEGER NOT NULL,\\n`department_name` VARCHAR(80),\\nFOREIGN KEY (`dept_store_id` ) REFERENCES `Department_Stores`(`dept_store_id` )\\n)', 'Order_Items': 'CREATE TABLE `Order_Items` (\\n`order_item_id` INTEGER PRIMARY KEY,\\n`order_id` INTEGER NOT NULL,\\n`product_id` INTEGER NOT NULL,\\nFOREIGN KEY (`order_id` ) REFERENCES `Customer_Orders`(`order_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Product_Suppliers': 'CREATE TABLE `Product_Suppliers` (\\n`product_id` INTEGER NOT NULL,\\n`supplier_id` INTEGER NOT NULL,\\n`date_supplied_from` DATETIME NOT NULL,\\n`date_supplied_to` DATETIME,\\n`total_amount_purchased` VARCHAR(80),\\n`total_value_purchased` DECIMAL(19,4),\\nPRIMARY KEY (`product_id`, `supplier_id`),\\nFOREIGN KEY (`supplier_id` ) REFERENCES `Suppliers`(`supplier_id` ),\\nFOREIGN KEY (`product_id` ) REFERENCES `Products`(`product_id` )\\n)', 'Staff_Department_Assignments': 'CREATE TABLE `Staff_Department_Assignments` (\\n`staff_id` INTEGER NOT NULL,\\n`department_id` INTEGER NOT NULL,\\n`date_assigned_from` DATETIME NOT NULL,\\n`job_title_code` VARCHAR(10) NOT NULL,\\n`date_assigned_to` DATETIME,\\nPRIMARY KEY (`staff_id`, `department_id`),\\nFOREIGN KEY (`department_id` ) REFERENCES `Departments`(`department_id` ),\\nFOREIGN KEY (`staff_id` ) REFERENCES `Staff`(`staff_id` )\\n)'}\n\n## User-Prompt:\nقائمة بأسماء الموظفين الذين تم تعيينهم في وظائف متعددة.\n# Output SQL:\n```SQL", "input": "", "output": "```sql\nSELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"\n```", "history": []}]