Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
323
8.06k
conversations
listlengths
6
48
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 character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "List all applications including the application reference number, the first and last name of the citizen who submitted it, and the name of the service the application is for.", "sql": null }, { "role": "assistant", "content": "SELECT T1.reference_number, T2.firs...
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": "Count the number of transactions for each status.", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) AS tx_count\nFROM web3.transactions\nGROUP BY status;", "sql": null }, { "role": "user", "content": "Actually, only incl...
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.medications ( medication_id character varying(64) NOT NULL, medication_na...
[ { "role": "user", "content": "Show me all medications, their manufacturer, and NDC code for medications manufactured by 'Johnson & Johnson' or 'Roche'.", "sql": null }, { "role": "assistant", "content": "SELECT medication_name, manufacturer, ndc_code FROM healthcare.medications WHERE manufac...
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 // PUT /schedules { "mappings": { "properties": { "schedule_id": { "type": "keyword" ...
[ { "role": "user", "content": "能否帮我查询特定列车行程(schedule_id 为 'sched_001')的详细信息,包括列车出发和到达时间,以及该行程所属路线的ID和相关乘客信息?", "sql": null }, { "role": "assistant", "content": "SELECT s.schedule_id, s.train_id, s.route_id, s.departure_datetime, s.arrival_datetime, s.status, p.passenger_id, p.first_name, p.la...
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.securities ( security_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Show me all securities (security_id, ticker_symbol, security_name) that are traded on the NASDAQ exchange and belong to the 'Technology' sector, along with the employees (employee_id, first_name, last_name) who work in the 'Investment' department and were hired in the last 3 ye...
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": "How many patients have provided both a phone_number and emergency_contact_phone?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM healthcare.patients WHERE phone_number IS NOT NULL AND emergency_contact_phone IS NOT NULL;", "sql": nul...
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 cex_token_balance ( snapshot_time.text, chain.text, address.text, exchange.text, tok...
[ { "role": "user", "content": "Which exchanges hold the largest total USD value of tokens on the BSC chain in the most recent snapshot, and what is the top token (by usd_value) held by each exchange?", "sql": null }, { "role": "assistant", "content": "WITH latest_snapshot AS (\n SELECT MAX(s...
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/'.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, claim_id, file_name FROM insurance.claim_documents WHERE mime_type LIKE 'image/%';", ...
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.in_game_items ( item_id uuid NOT NULL DEFAULT gen_random_uuid(...
[ { "role": "user", "content": "List each item's name, type, and rarity, along with the currency in which it can be purchased and its cost.", "sql": null }, { "role": "assistant", "content": "SELECT item_name, item_type, rarity, cost_currency, cost_amount FROM gaming_technology.in_game_items;"...
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.customers ( customer_id text, first_name text, last_name text, da...
[ { "role": "user", "content": "Show me for each loan_type, the total number of loans and the average principal_amount, along with the average account balance for the accounts associated with those loans.", "sql": null }, { "role": "assistant", "content": "SELECT l.loan_type, COUNT(l.loan_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.vehicles ( vehicle_id text, license_plate text, vin text, make text, ...
[ { "role": "user", "content": "Show each vehicle's ID along with another vehicle's ID where they share the same make but have different models. Sort by the first vehicle_id.", "sql": null }, { "role": "assistant", "content": "SELECT v1.vehicle_id AS vehicle_a, v2.vehicle_id AS vehicle_b\nFROM...
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.wallets ( wallet_id text, user_id text, address_id text, private_key text...
[ { "role": "user", "content": "Show me all wallet addresses along with their private keys for users who have more than 3 wallets.", "sql": null }, { "role": "assistant", "content": "SELECT w1.address_id, w1.private_key FROM blockchain.wallets w1 INNER JOIN (SELECT user_id FROM blockchain.wall...
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.players ( player_id uuid PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "For each player, can you find the username and registration_date of the player who registered immediately before them in the same country?", "sql": null }, { "role": "assistant", "content": "SELECT p.player_id,\n p.username AS current_username,\n p.r...
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, block_timestamp timestamp, transacti...
[ { "role": "user", "content": "Show me the historical balance entries for wallet address '0xabc...' and contract address '0xdef...', including the block number and amount.", "sql": null }, { "role": "assistant", "content": "SELECT block_number, amount FROM erc20_balances_historical WHERE wall...
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": "Find the total number of unique document types stored in the claim_documents table.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(DISTINCT document_type) FROM insurance.claim_documents;", "sql": null }, { "role": "user", "conte...
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 // Use Hashes for ticket details. Key format: ticket:<ticket_id> // HSET ticket:tkt_1a2b ticket_i...
[ { "role": "user", "content": "特定の予約ID 'book_zyx' に関連するすべてのチケットの詳細を取得するのを手伝っていただけますか?また、関連する車両情報も含めてください。", "sql": null }, { "role": "assistant", "content": "SMEMBERS booking:book_zyx:tickets\nHGETALL ticket:<ticket_id>\nHGETALL car:<car_id>", "sql": null }, { "role": "user", ...
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": "List all trades for asset 'BTC' where the trade quantity is greater than 5.", "sql": null }, { "role": "assistant", "content": "SELECT trade_id, order_id, buyer_id, seller_id, quantity, price, traded_at FROM trading_platform.trades WHERE asset_id = 'BTC' AND qua...
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, -- unique identif...
[ { "role": "user", "content": "Which customers have more than one active policy at the same time? Show the customer ID and the number of active policies.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, COUNT(policy_id) AS active_policy_count\nFROM insurance.policies\nW...
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": "List all pairs of customers who live in the same zip_code. Show customer1_id, customer2_id, and zip_code.", "sql": null }, { "role": "assistant", "content": "SELECT\n c1.customer_id AS customer1_id,\n c2.customer_id AS customer2_id,\n c1.zip_code\nFROM insura...
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.wallets ( wallet_id character varying(64) NOT NULL, user_id charact...
[ { "role": "user", "content": "List all peers with their IP addresses who have not been seen in the last 7 days.", "sql": null }, { "role": "assistant", "content": "SELECT peer_id, ip_address, port, last_seen\nFROM trading_platform.peers\nWHERE last_seen < NOW() - INTERVAL '7 days';", "sq...
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 character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Find all properties in California (state_province = 'California') that have a phone number and email address listed.", "sql": null }, { "role": "assistant", "content": "SELECT property_name, city, phone_number, email_address FROM hospitality_technology.propertie...
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.users ( user_id text PRIMARY KEY, username text, email text, password_hash text...
[ { "role": "user", "content": "Show the user_id, username, and email for users who registered at the same timestamp as another user.", "sql": null }, { "role": "assistant", "content": "SELECT u1.user_id, u1.username, u1.email FROM web3.users u1 JOIN web3.users u2 ON u1.created_at = u2.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 hospitality_technology.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List all room numbers, their type names, and base rates for rooms located on floor 5.", "sql": null }, { "role": "assistant", "content": "SELECT T1.room_number, T2.type_name, T2.base_rate FROM hospitality_technology.rooms AS T1 JOIN hospitality_technology.room_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 // db.createCollection('stations') // Optional: Add unique index: db.stations.createIndex({ stati...
[ { "role": "user", "content": "Can you help me count the total number of active staff members in the database?", "sql": null }, { "role": "assistant", "content": "db.staff.countDocuments({ is_active: true });", "sql": null }, { "role": "user", "content": "Can you assist me in ...
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.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "List the username and full name of all users who have set their profile to private.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, u.full_name FROM social_media.users u JOIN social_media.user_settings us ON u.user_id = us.user_id WHERE us...
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.room_types ( room_type_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "List all reviews that have a staff response, including the review comment, staff response text, and the ID of the staff who responded.", "sql": null }, { "role": "assistant", "content": "SELECT comment, staff_response, response_staff_id FROM hospitality_technolo...
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.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "Find the total unbilled but billable hours for each lawyer. Only include lawyers with more than 10 such hours, and sort by total hours descending.", "sql": null }, { "role": "assistant", "content": "SELECT lawyer_id, SUM(hours_spent) AS total_unbilled_hours FROM...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
6