Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
323
8.06k
conversations
listlengths
6
56
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.developers ( developer_id uuid PRIMARY KEY, name text, country tex...
[ { "role": "user", "content": "I want to see, for each game, the total number of sessions and the average cost of its in-game items.", "sql": null }, { "role": "assistant", "content": "SELECT gs.game_id, COUNT(*) AS session_count, AVG(igi.cost_amount) AS avg_item_cost FROM gaming_technology.g...
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": "I want to know the usernames of users who have followed more than three different people, along with the date they created their accounts.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, u.created_at, COUNT(DISTINCT f.following_user_id) 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 social_media.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea...
[ { "role": "user", "content": "Retrieve conversation IDs and user IDs of participants who joined after '2024-01-01', including their last_read_at timestamps.", "sql": null }, { "role": "assistant", "content": "SELECT conversation_id, user_id, last_read_at FROM social_media.conversation_partic...
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 number of vacation days taken by employee with ID 'EMP101' in the past year?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I can't provide information on the vacation days taken by an employee as this data is not stored 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 legal_services.invoices ( invoice_id.text, invoice_number.text, client_id.text, case...
[ { "role": "user", "content": "For each case, show the total amount of all invoices and the number of scheduled appointments. Only include cases that have both an invoice and at least one appointment.", "sql": null }, { "role": "assistant", "content": "SELECT i.case_id, SUM(i.total_amount) 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 insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "Show all policies that started before January 1, 2022, including policy_id, policy_number, start_date, and status.", "sql": null }, { "role": "assistant", "content": "SELECT policy_id, policy_number, start_date, status\nFROM insurance.policies\nWHERE start_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 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 blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti...
[ { "role": "user", "content": "Show me all nodes that were last seen in the past 30 days, along with their IP addresses and ports.", "sql": null }, { "role": "assistant", "content": "SELECT node_id, ip_address, port, last_seen FROM blockchain.nodes WHERE last_seen >= NOW() - INTERVAL '30 days...
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.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, COUNT(*) AS payment_count FROM insurance.premium_payments WHERE payment_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 web3.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "Count how many tokens exist for each contract_address.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address,\n COUNT(*) AS token_count\nFROM web3.tokens\nGROUP BY contract_address;", "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 healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo...
[ { "role": "user", "content": "I’d like to see a list of appointments along with any prescriptions made on the same day. Include appointment_id, prescription_id, medication_name, and appointment_time.", "sql": null }, { "role": "assistant", "content": "SELECT a.appointment_id, p.prescription_...
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 character varying(64) NOT NULL, first_nam...
[ { "role": "user", "content": "Show me all trades with their corresponding ticker_symbol and security_name for trades executed in the last 7 days.", "sql": null }, { "role": "assistant", "content": "SELECT tr.trade_id, tr.account_id, tr.trade_type, tr.quantity, tr.price_per_unit, tr.total_amo...
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.", "sql": null }, { "role": "assistant", "content": "SELECT count(DISTINCT specialty) FROM healthcare.doctors;", "sql": null }, { "role": "user", "content": "Show the lice...
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 character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Show me all active accounts with a balance greater than 2000.", "sql": null }, { "role": "assistant", "content": "SELECT account_id, account_number, customer_id, account_type, balance, currency\nFROM financial_services.accounts\nWHERE status = 'Open' AND balance...
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...
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.", "sql": null }, { "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 trading_platform.kyc_audit ( kyc_audit_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "Show me all KYC audit records for user ID 'user_abc_123'.", "sql": null }, { "role": "assistant", "content": "SELECT kyc_audit_id, user_id, status, reviewed_at FROM kyc_audit WHERE user_id = 'user_abc_123';", "sql": null }, { "role": "user", "con...
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, -- unique iden...
[ { "role": "user", "content": "Retrieve the most recent log entry for each user, including action and logged_at.", "sql": null }, { "role": "assistant", "content": "SELECT l1.user_id,\n l1.action,\n l1.logged_at\nFROM trading_platform.logs l1\nWHERE l1.logged_at = (\n SELECT MAX(...
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 PRIMARY KEY, agency_id text, service_...
[ { "role": "user", "content": "List the payment ID, amount, and the name of the service for all payments associated with services in the 'Licensing' category.", "sql": null }, { "role": "assistant", "content": "SELECT p.payment_id, p.amount, s.service_name FROM government_services.payments p ...
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.bookings ( booking_id.text, passenger_id.text, trip_id.text, seat_num...
[ { "role": "user", "content": "List the number of bookings for each day.", "sql": null }, { "role": "assistant", "content": "SELECT DATE(booking_time) AS booking_date, COUNT(*) AS booking_count\nFROM transportation.bookings\nGROUP BY DATE(booking_time);\n", "sql": null }, { "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 financial_services.trades ( trade_id character varying(64) NOT NULL, account_id char...
[ { "role": "user", "content": "Show me the total quantity traded and total amount for each security, identified by its ticker symbol, for trades in the last month.", "sql": null }, { "role": "assistant", "content": "SELECT T2.ticker_symbol, SUM(T1.quantity), SUM(T1.total_amount) FROM financia...
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": "I need a list of genres and pairs of game titles in the same genre.", "sql": null }, { "role": "assistant", "content": "SELECT g1.genre, g1.title AS game1, g2.title AS game2\nFROM gaming_technology.games g1\nJOIN gaming_technology.games g2\n ON g1.genre = g2.ge...
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 PRIMARY KEY, username text, email text, password_h...
[ { "role": "user", "content": "How many users have non-empty full_name and bio fields? Return only the count.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*)\nFROM social_media.users\nWHERE full_name IS NOT NULL\n AND full_name <> ''\n AND bio IS NOT NULL\n AND bio <> '...
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 me all vehicles that had maintenance in the past month, including their make, model, maintenance service_date, and depot name.", "sql": null }, { "role": "assistant", "content": "SELECT v.vehicle_id,\n v.make,\n v.model,\n m.service_date,\...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
7