Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
315
8.35k
conversations
listlengths
2
8
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Which route numbers connect locations with a distance less than 80 km and more than 5 words in their description? Include the route type in the results." }, { "role": "assistant", "content": "SELECT route_number, type FROM transportation.routes WHERE distance_km < 8...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "role": "user", "content": "What is the average balance for each account_type among accounts with status 'Open'?" }, { "role": "assistant", "content": "SELECT account_type, AVG(balance) AS avg_balance FROM financial_services.accounts WHERE status = 'Open' GROUP BY account_type;" }, { "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id.text, from_address.text, to_address.text, value.n...
[ { "role": "user", "content": "For each sender address that has sent at least 10 transactions, show the address and the total gas used by their transactions." }, { "role": "assistant", "content": "SELECT from_address, SUM(gas_used) AS total_gas_used\nFROM web3.transactions\nGROUP BY from_address\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.hashtags ( hashtag_id text, tag_name text, created_at timestamp )
[ { "role": "user", "content": "Show me all hashtag IDs and their tag names that were created after June 10, 2024 and whose tag names contain the word 'dev'." }, { "role": "assistant", "content": "SELECT hashtag_id, tag_name FROM social_media.hashtags WHERE created_at > '2024-06-10' AND tag_name I...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the current job satisfaction level or feedback from staff members working at a specific train station?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on job satisfaction levels or feedback from staff members as this data is...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.token_transfers ( transfer_id text, token_id text, from_address text, to_addres...
[ { "role": "user", "content": "For each transaction, show its transaction_id and the count of tokens transferred within that transaction." }, { "role": "assistant", "content": "SELECT transaction_id, COUNT(token_id) AS tokens_transferred FROM web3.token_transfers GROUP BY transaction_id;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.locations ( location_id text PRIMARY KEY, name text, type text, addre...
[ { "role": "user", "content": "Can you show me the name, city, and type for all locations that are in the same city but have different types?" }, { "role": "assistant", "content": "SELECT l1.name, l1.city, l1.type FROM transportation.locations l1 JOIN transportation.locations l2 ON l1.city = l2.c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text...
[ { "role": "user", "content": "What is the total balance and the number of accounts for each currency, including only accounts opened in the last 2 years?" }, { "role": "assistant", "content": "SELECT currency , SUM(balance) AS total_balance , COUNT(*) AS account_count FROM financial_services.a...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the current number of passengers waiting at platform 2B at station ABC?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the current number of passengers at a specific platform. The data in the platforms table only include...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.documents ( document_id.text, case_id.text, document_name.text, docum...
[ { "role": "user", "content": "Find documents that have the same document_name but are associated with different cases. Show the document name and the two different case IDs." }, { "role": "assistant", "content": "SELECT d1.document_name, d1.case_id AS case_id_1, d2.case_id AS case_id_2 FROM lega...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the manufacturing date of the train car with car_id 'CAR789'?" }, { "role": "assistant", "content": "I'm sorry, but I don't have access to information about the manufacturing date of train cars. The data available in the train_cars table only includes detail...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.invoices ( invoice_id text PRIMARY KEY, invoice_number text UNIQUE, c...
[ { "role": "user", "content": "List pairs of invoices for the same case where one invoice's total_amount is lower than another's; show lower_invoice_number, higher_invoice_number, and case_id." }, { "role": "assistant", "content": "SELECT a.invoice_number AS lower_invoice_number,\n b.invoic...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id character varying(64) NOT NULL, -- unique ide...
[ { "role": "user", "content": "Show me all active policies for customers who live in California, along with their total premium payments made so far." }, { "role": "assistant", "content": "SELECT p.policy_id, p.policy_number, c.first_name, c.last_name, p.premium_amount, SUM(pp.amount_paid) AS tot...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.services ( service_id.text, property_id.text, service_name.te...
[ { "role": "user", "content": "Calculate the average price for services within each category." }, { "role": "assistant", "content": "SELECT category, AVG(price) FROM hospitality_technology.services GROUP BY category;" }, { "role": "user", "content": "Only include categories where the ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "List all customers who have two policies with overlapping coverage periods and show both policy numbers along with the overlap start and end dates." }, { "role": "assistant", "content": "SELECT p1.customer_id, p1.policy_number AS policy_number1, p2.policy_number AS ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo...
[ { "role": "user", "content": "Get the total number of appointments grouped by status." }, { "role": "assistant", "content": "SELECT status,\n COUNT(*) AS appointment_count\nFROM healthcare.appointments\nGROUP BY status;" }, { "role": "user", "content": "Now filter to include on...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo...
[ { "role": "user", "content": "Show the username and the total number of log entries for each user who has logged any action." }, { "role": "assistant", "content": "SELECT T1.username, COUNT(T2.log_id) FROM users AS T1 JOIN logs AS T2 ON T1.user_id = T2.user_id GROUP BY T1.username;" }, { ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.services ( service_id text, agency_id text, service_name text, d...
[ { "role": "user", "content": "Show me the first name and last name of citizens who have scheduled appointments for services offered by agencies whose agency_id starts with 'AG'. Also include the service name." }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, s.service_name...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claim_documents ( document_id character varying(64) NOT NULL, claim_id cha...
[ { "role": "user", "content": "Show the document ID, claim ID, and file name for all documents with a MIME type starting with 'image/'." }, { "role": "assistant", "content": "SELECT document_id, claim_id, file_name FROM insurance.claim_documents WHERE mime_type LIKE 'image/%';" }, { "role...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id text, national_id_number text, first_name ...
[ { "role": "user", "content": "For each state, show the total number of service locations and the number of employees working at agencies within those states." }, { "role": "assistant", "content": "SELECT sl.state, COUNT(DISTINCT sl.location_id) AS location_count, COUNT(DISTINCT e.employee_id) AS...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the history of incidents or accidents that occurred on platform 5 at station GHI?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information about the history of incidents or accidents on platform 5 at station GHI. My data is limited t...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc1155_approval_for_all ( block_number bigint NOT NULL, -- Block number contain...
[ { "role": "user", "content": "Which wallets have sent more than 5 BTC in the past 7 days? Show wallet_address and total_sent_amount." }, { "role": "assistant", "content": "SELECT ta.from_address AS wallet_address, SUM(ta.amt) AS total_sent\nFROM token_activities ta\nWHERE ta.tick = 'BTC'\n AND ...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the reason for the termination of employee with ID 'EMP789'?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the reason for an employee's termination as it is not stored in the current database table." } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.achievements ( achievement_id uuid NOT NULL DEFAULT gen_random...
[ { "role": "user", "content": "Can you list the names of achievements and the length of their descriptions? Show the ones with the longest descriptions first." }, { "role": "assistant", "content": "SELECT name, LENGTH(description) AS description_length FROM achievements ORDER BY description_lengt...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.premium_payments ( payment_id text PRIMARY KEY, policy_id text, customer_i...
[ { "role": "user", "content": "Which customers have made more than three premium payments in 2024? Show the customer_id and the number of payments." }, { "role": "assistant", "content": "SELECT customer_id, COUNT(*) AS payment_count FROM insurance.premium_payments WHERE payment_date >= '2024-01-0...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.trades ( trade_id character varying(64) NOT NULL, order_id characte...
[ { "role": "user", "content": "For each asset, show the asset name, symbol, and the latest trade price." }, { "role": "assistant", "content": "SELECT a.asset_id, a.name AS asset_name, a.symbol AS asset_symbol, (\n SELECT t1.price FROM trading_platform.trades t1\n WHERE t1.asset_id = a.asset...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.games ( game_id uuid, title text, developer_id uuid, publisher_id ...
[ { "role": "user", "content": "List all in-game items with their name, type, and rarity." }, { "role": "assistant", "content": "SELECT item_name, item_type, rarity FROM gaming_technology.in_game_items;" }, { "role": "user", "content": "Filter this list to include only items with 'Rare...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id.text, property_name.text, address_li...
[ { "role": "user", "content": "Show each property's name, the number of available rooms, and the number of available services it currently offers." }, { "role": "assistant", "content": "SELECT p.property_name,\n COUNT(DISTINCT r.room_id) AS available_rooms,\n COUNT(DISTINCT s.service_...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the average speed of train number T9876 during its last journey?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the average speed of train number T9876 during its last journey. The data in the trains table does not inclu...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.post_hashtags ( post_hashtag_id character varying(64) NOT NULL, post_id...
[ { "role": "user", "content": "How many unique hashtags are linked to each post? Return post_id and hashtag_count." }, { "role": "assistant", "content": "SELECT post_id, COUNT(DISTINCT hashtag_id) AS hashtag_count\nFROM social_media.post_hashtags\nGROUP BY post_id;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.law_firms ( firm_id character varying(64) NOT NULL, firm_name charact...
[ { "role": "user", "content": "List pairs of law firms that are located at the same address. Display the names of both firms and the shared address, ensuring the address is not null." }, { "role": "assistant", "content": "SELECT\n t1.firm_name AS firm1_name,\n t2.firm_name AS firm2_name,\n t1....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "List the top 5 Avalanche tokens by total transfer volume in token_activities_avalanche." }, { "role": "assistant", "content": "SELECT tick, SUM(amt) AS total_volume\nFROM token_activities_avalanche\nGROUP BY tick\nORDER BY total_volume DESC\nLIMIT 5;" }, { "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Retrieve route_number, description, and distance_km for routes that have a distance greater than the average distance of all routes." }, { "role": "assistant", "content": "SELECT route_number, description, distance_km\nFROM transportation.routes\nWHERE distance_km >...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "List all insurance products with a base premium less than 500, ordered by base premium ascending. Show product name, product type, and base premium." }, { "role": "assistant", "content": "SELECT product_name, product_type, base_premium FROM insurance.insurance_produ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "role": "user", "content": "List all invoices that were paid within 7 days of their issue date. Show invoice number, issue date, payment date, and total amount." }, { "role": "assistant", "content": "SELECT invoice_number, issue_date, payment_date, total_amount FROM legal_services.invoices WHE...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "Which SUI coins are currently marked as 'exists' and have a balance over 500000 for any owner? Please show the coin_type, balance, and owner." }, { "role": "assistant", "content": "SELECT coin_type, balance, owner FROM sui_coins WHERE status = 'exists' AND CAST(bala...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.service_orders ( order_id.text, reservation_id.text, guest_id...
[ { "role": "user", "content": "List each guest and the number of distinct services they have ordered, along with their guest_id." }, { "role": "assistant", "content": "SELECT guest_id, COUNT(DISTINCT service_id) AS distinct_services_ordered\nFROM hospitality_technology.service_orders\nGROUP BY gu...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media...
[ { "role": "user", "content": "Show the count of unread notifications per user for notifications related to posts. Return recipient_user_id and unread_count." }, { "role": "assistant", "content": "SELECT recipient_user_id, COUNT(*) AS unread_count\nFROM social_media.notifications\nWHERE target_en...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "For each user with at least two wallets, calculate the average time difference in hours between consecutive wallet creations. Return user_id and avg_diff_hours." }, { "role": "assistant", "content": "SELECT user_id, AVG(EXTRACT(EPOCH FROM (created_at - prev_created)...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "Find all pairs of vehicles that have the same make and model but different fuel types. For each pair, display the first vehicle_id, the second vehicle_id, make, model, fuel_type of the first as fuel_type1 and of the second as fuel_type2." }, { "role": "assistant", "...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "List all maintenance logs for vehicles that are currently active, showing the vehicle ID and service type." }, { "role": "assistant", "content": "SELECT m.vehicle_id, m.service_type FROM transportation.maintenance_logs m JOIN transportation.vehicles v ON m.vehicle_i...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti...
[ { "role": "user", "content": "Show me pairs of node_id and node_id for nodes that share the same ip_address but have different port numbers." }, { "role": "assistant", "content": "SELECT n1.node_id AS node_id1, n2.node_id AS node_id2, n1.ip_address, n1.port AS port1, n2.port AS port2 FROM blockc...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text...
[ { "role": "user", "content": "Show me the first name, last name, and position of all staff members, along with the name of the property they work at." }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM hospitality_technology.staff AS T1 J...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.services ( service_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "For all scheduled appointments in the next 14 days, list the appointment ID, scheduled start time, the name of the service, and the standard fee." }, { "role": "assistant", "content": "SELECT a.appointment_id, a.scheduled_start_time, s.service_name, s.standard_fee\n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE smart_money_token_performance ( token_address character varying(100) NOT NULL, token...
[ { "role": "user", "content": "Which token on the Ethereum chain had the highest realized ratio last quarter? Show the symbol, realized ratio, and ROI." }, { "role": "assistant", "content": "SELECT token_symbol, realized_ratio, roi FROM smart_money_token_performance WHERE chain = 'Ethereum' AND d...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "Show me the total number of appointments grouped by each unique duration in minutes. Include only durations with more than 5 appointments." }, { "role": "assistant", "content": "SELECT duration_minutes, COUNT(*) AS appointment_count\nFROM healthcare.appointments\nGR...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the reason behind the cost variation for maintenance of asset_id 'ASSET456' over the past year?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the reasons behind cost variations for maintenance. The data in the maintenan...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "List all Sui NFTs with 'exists' status from the 'Gaming' collection type. Show the object_id, name, and owner." }, { "role": "assistant", "content": "SELECT object_id, name, owner FROM sui_nfts WHERE status = 'exists' AND collection_type = 'Gaming'" }, { "ro...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.passengers ( passenger_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Show me the email and full name of passengers who are enrolled in a loyalty program, along with the date they joined, ordered by most recent sign-up." }, { "role": "assistant", "content": "SELECT email, CONCAT(first_name, ' ', last_name) AS full_name, created_at FRO...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the maintenance schedule for the platforms at the station with ID 'ST234' for the next month?" }, { "role": "assistant", "content": "I'm sorry, but I don't have access to the maintenance schedule for the platforms at any station. The data I have only include...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.servers ( server_id uuid, game_id uuid, server_name text, region t...
[ { "role": "user", "content": "Show the maximum and minimum current_players for each server status." }, { "role": "assistant", "content": "SELECT status, MAX(current_players) AS max_current_players, MIN(current_players) AS min_current_players FROM gaming_technology.servers GROUP BY status;" }, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, -- the id of the token t...
[ { "role": "user", "content": "Show me all tokens which have a 6-hour price change percentage above 2% and the current price, on the Arbitrum chain." }, { "role": "assistant", "content": "SELECT token_symbol, price, price_change_percentage_6h\nFROM token_dexpool_info\nWHERE chain = 'Arbitrum'\n ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Provide the count of diagnoses by status." }, { "role": "assistant", "content": "SELECT status,\n COUNT(*) AS count\nFROM healthcare.diagnoses\nGROUP BY status;" }, { "role": "user", "content": "Now only include statuses with more than 10 diagnoses...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "role": "user", "content": "For each asset, list its ID and the total number of trades and the total traded value (quantity * price)." }, { "role": "assistant", "content": "SELECT a.asset_id,\n COALESCE(t.trade_count, 0) AS trade_count,\n COALESCE(t.total_value, 0) AS total_value\n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var...
[ { "role": "user", "content": "List all tokens with a price below $1 and a 24-hour trading volume over $5 million." }, { "role": "assistant", "content": "SELECT token_name, token_symbol, price, total_volume FROM token_basic_info WHERE price < 1 AND total_volume::numeric > 5000000;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id text PRIMARY KEY, patient_id text, appointmen...
[ { "role": "user", "content": "List all medical records along with the chief complaint and record date for patients who had their medical record created after March 1, 2023 and whose record was created by doctor with ID 'doctor_123'." }, { "role": "assistant", "content": "SELECT record_id, patien...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.law_firms ( firm_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show me the name and founding date of every law firm." }, { "role": "assistant", "content": "SELECT firm_name, founded_date\nFROM law_firms;" }, { "role": "user", "content": "Also include the firm's phone number." }, { "role": "assistant", "c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claims ( claim_id character varying(64) NOT NULL, -- unique identifier...
[ { "role": "user", "content": "For each claim, count the number of beneficiaries associated with its policy. Show claim_id and beneficiary_count, only for claims with more than 2 beneficiaries." }, { "role": "assistant", "content": "SELECT c.claim_id, COUNT(pb.beneficiary_id) AS beneficiary_count...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What are the specific job responsibilities and daily tasks for a staff member with the role of Station Master?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information about the specific job responsibilities or daily tasks for a Station Mast...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex...
[ { "role": "user", "content": "Show me all payments made with a credit card (payment_method = 'credit_card') where the amount is greater than $500, including the reservation ID and payment timestamp." }, { "role": "assistant", "content": "SELECT payment_id, reservation_id, amount, payment_timesta...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.documents ( document_id character varying(64) NOT NULL, applicat...
[ { "role": "user", "content": "How many documents of each type currently have a verification_status of 'Pending'?" }, { "role": "assistant", "content": "SELECT\n document_type,\n COUNT(*) AS pending_count\nFROM government_services.documents\nWHERE verification_status = 'Pending'\nGROUP BY docum...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the average delay time for trains departing from platform 4 at station LMN during the past year?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on train delay times as this data is not stored in the platforms table. The tab...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.agents ( agent_id character varying(64) NOT NULL, first_name character var...
[ { "role": "user", "content": "Show all active agents along with their respective managers' full names." }, { "role": "assistant", "content": "SELECT a.agent_id, a.first_name || ' ' || a.last_name AS agent_name, m.first_name || ' ' || m.last_name AS manager_name FROM insurance.agents a LEFT JOIN ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.properties ( property_id text, property_name text, address_li...
[ { "role": "user", "content": "Show me the property ID, name, and creation date for all properties created after January 1, 2022." }, { "role": "assistant", "content": "SELECT property_id, property_name, created_at FROM hospitality_technology.properties WHERE created_at >= '2022-01-01';" }, {...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What are the ticket prices for trains departing from the station with ID 'ST456'?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on ticket prices as this data is not included in the station management database. For ticket pricing, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "List all policies that have a coverage limit greater than 750000 and a premium amount greater than 1000. Show the policy number, product ID, coverage limit, and premium amount." }, { "role": "assistant", "content": "SELECT\n policy_number,\n product_id,\n coverag...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the schedule of trains arriving at platform 1A at station XYZ on December 25th, 2023?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information about train schedules or specific arrival times as this data is not included in the platfo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.reviews ( review_id.text, property_id.text, reservation_id.te...
[ { "role": "user", "content": "Show me reviews from 'Expedia' that have an overall rating of 1 or 2." }, { "role": "assistant", "content": "SELECT review_id, property_id, guest_id, rating_overall, review_date, comment FROM hospitality_technology.reviews WHERE review_source = 'Expedia' AND rating_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, project_id character...
[ { "role": "user", "content": "Show all projects that raised funds in February 2022, including their names and investment values." }, { "role": "assistant", "content": "SELECT project_name, investment_value FROM project_fundraising_record WHERE investment_date LIKE '2022-02%';" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.medical_records ( record_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Can you provide a list of all medical records created by doctors for patients who are associated with 'PPO' type insurance plans? I need the record ID, patient ID, doctor ID, record date, and insurance plan name." }, { "role": "assistant", "content": "SELECT mr.reco...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the total revenue generated by ticket sales at the station with ID 'ST101' for the past month?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the revenue generated by ticket sales as this data is not available in the cur...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id...
[ { "role": "user", "content": "I need to list all chronic diagnoses that have at least one prescription, including diagnosis_code, diagnosis_date, and medication_name." }, { "role": "assistant", "content": "SELECT d.diagnosis_code, d.diagnosis_date, m.medication_name\nFROM healthcare.diagnoses d\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "Show me all patients who have had prescriptions for a medication named 'Metformin', including their full name, prescription date, and prescribing doctor's ID." }, { "role": "assistant", "content": "SELECT p.patient_id, p.first_name, p.last_name, pr.prescription_date...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea...
[ { "role": "user", "content": "I need to find users who have liked both a post and a comment on the same day. For each such user and date, list user_id, date, post_id, and comment_id." }, { "role": "assistant", "content": "SELECT p.user_id, DATE(p.created_at) AS like_date, p.post_id, c.comment_id...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.prescriptions ( prescription_id text PRIMARY KEY, record_id text, patient...
[ { "role": "user", "content": "Show prescription ID, patient ID, and medication ID for prescriptions that have a start date before their end date." }, { "role": "assistant", "content": "SELECT prescription_id, patient_id, medication_id FROM healthcare.prescriptions WHERE start_date IS NOT NULL AN...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "Show all ERC20 token approvals that happened between block numbers 18000000 and 18500000, including the contract address and number of approvals per contract." }, { "role": "assistant", "content": "SELECT contract_address, COUNT(*) AS approval_count FROM erc20_appro...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "Retrieve each vehicle's latest maintenance service date and mechanic alongside its make and model." }, { "role": "assistant", "content": "SELECT v.vehicle_id, v.make, v.model, ml.service_date, ml.mechanic_name\nFROM transportation.vehicles v\nJOIN transportation.mai...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.accounts ( account_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "For each customer, provide a summary of their account statuses, showing their full name, account status, and the count of accounts for each status." }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, a.status, COUNT(a.account_id) AS account_coun...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What are the training programs or certifications completed by a staff member with the role of Platform Supervisor?" }, { "role": "assistant", "content": "I'm sorry, but I don't have access to information about the training programs or certifications completed by sta...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id text, first_name text, last_name text, date_of_bir...
[ { "role": "user", "content": "List customers who have active 'Auto' policies, showing their first name, last name, the policy number, and the product name." }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.policy_number, T3.product_name FROM insurance.customers AS T1 ...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREA...
[ { "role": "user", "content": "What is the current salary of employee with ID 'EMP123'?" }, { "role": "assistant", "content": "I'm sorry, but I can't provide information about an employee's salary as it is not included in the data available in the 'employees' table." } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.applications ( application_id character varying(64) NOT NULL, ci...
[ { "role": "user", "content": "Provide a count of documents grouped by their current verification status." }, { "role": "assistant", "content": "SELECT verification_status, COUNT(*) FROM government_services.documents GROUP BY verification_status" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id text PRIMARY KEY, property_id text, room_numb...
[ { "role": "user", "content": "List all non-smoking rooms at property 'PROP01' that have a status of 'OutOfOrder'. Show the room number and floor." }, { "role": "assistant", "content": "SELECT room_number, floor FROM hospitality_technology.rooms WHERE property_id = 'PROP01' AND is_smoking = FALSE...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.player_inventory ( inventory_id uuid PRIMARY KEY, player_id uuid, ...
[ { "role": "user", "content": "For each player, calculate the total quantity of items they have acquired. Return player_id and total_quantity." }, { "role": "assistant", "content": "SELECT player_id,\n SUM(quantity) AS total_quantity\nFROM gaming_technology.player_inventory\nGROUP BY player...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex...
[ { "role": "user", "content": "List all payments processed in USD, showing payment_id, guest_id, amount, and payment_timestamp." }, { "role": "assistant", "content": "SELECT payment_id,\n guest_id,\n amount,\n payment_timestamp\nFROM hospitality_technology.payments\nWHERE curren...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.orders ( order_id text PRIMARY KEY, user_id text, wallet_id text, a...
[ { "role": "user", "content": "How many unread notifications does each user have?" }, { "role": "assistant", "content": "SELECT user_id,\n COUNT(*) AS unread_notifications\nFROM trading_platform.notifications\nWHERE read_at IS NULL\nGROUP BY user_id;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "Count the total number of distinct specialties listed in the doctors table." }, { "role": "assistant", "content": "SELECT count(DISTINCT specialty) FROM healthcare.doctors;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "For each route, show the route number and the total number of trips associated with it." }, { "role": "assistant", "content": "SELECT T2.route_number, count(T1.trip_id) FROM transportation.trips AS T1 JOIN transportation.routes AS T2 ON T1.route_id = T2.route_id GRO...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.appointments ( appointment_id text, citizen_id text, employee_id...
[ { "role": "user", "content": "Can you list all appointments along with the scheduled start time, purpose, and booking method, as well as the employee ID and location ID for each appointment?" }, { "role": "assistant", "content": "SELECT appointment_id, scheduled_start_time, purpose, booking_meth...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
3