Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringlengths
315
7.77k
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 insurance.policies ( policy_id character varying(64) NOT NULL, -- unique identif...
[ { "role": "user", "content": "For each insurance product type, retrieve the total premium_amount and average coverage_limit for policies under active products. Include product_type, total_premium, and avg_coverage_limit, sorted by total_premium descending.", "sql": null }, { "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 legal_services.cases ( case_id character varying(64) NOT NULL, case_number character...
[ { "role": "user", "content": "Show me a list of all cases and include the case number, case name, and the court jurisdiction for each case, as well as the lead lawyer's ID and the case status.", "sql": null }, { "role": "assistant", "content": "SELECT case_number, case_name, court_jurisdicti...
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 character varying(64) NOT NULL, tag_name characte...
[ { "role": "user", "content": "I need all pairs of hashtags that start with the same first two letters. Show both tag names.", "sql": null }, { "role": "assistant", "content": "SELECT h1.tag_name AS tag1, h2.tag_name AS tag2\nFROM social_media.hashtags h1\nJOIN social_media.hashtags h2\n 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 financial_services.trades ( trade_id character varying(64) NOT NULL, account_id char...
[ { "role": "user", "content": "Show me all trades (trade_id, security_id, total_amount) where the trade_type is 'Buy' and the execution_venue is 'NYSE', along with the loan details (loan_type, principal_amount) for accounts that have both trades and loans.", "sql": null }, { "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 financial_services.securities ( security_id text, ticker_symbol text, isin_code text...
[ { "role": "user", "content": "Count the number of securities and the number of distinct issuers for each sector.", "sql": null }, { "role": "assistant", "content": "SELECT sector, COUNT(*) AS securities_count, COUNT(DISTINCT issuer_name) AS distinct_issuer_count FROM financial_services.secur...
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": "For each claim, show the corresponding product_type of the insurance product for the related policy.", "sql": null }, { "role": "assistant", "content": "SELECT cl.claim_id, ip.product_type\nFROM insurance.claims cl\nJOIN insurance.policies p ON cl.policy_id = 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 gaming_technology.games ( game_id.uuid, title.text, developer_id.uuid, publisher_id....
[ { "role": "user", "content": "How many games are there per platform, and what is the earliest release_date for each platform?", "sql": null }, { "role": "assistant", "content": "SELECT platform,\n COUNT(*) AS game_count,\n MIN(release_date) AS earliest_release\nFROM gaming_techno...
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.", "sql": null }, { "role": "assistant", "content": "SELECT from_address, SUM(gas_used) AS total_gas_used\nFROM web3.transactions\nGROUP...
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": "Give me a list of all specializations available at each law firm.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT firm_id, specialization\nFROM legal_services.lawyers;", "sql": null }, { "role": "user", "content": "For each sp...
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, -- ...
[ { "role": "user", "content": "Show me all conversation IDs (whether group chat or not) that have at least one hashtag used in posts linked to them.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT c.conversation_id\nFROM social_media.conversations c\nJOIN social_media.post...
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, prop...
[ { "role": "user", "content": "List all property pairs that share the same postal_code, showing each pair's property IDs, names, and the postal_code.", "sql": null }, { "role": "assistant", "content": "SELECT a.property_id AS property_id_1,\n a.property_name AS property_name_1,\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 gaming_technology.achievements ( achievement_id uuid, game_id uuid, name text, descr...
[ { "role": "user", "content": "I need to list pairs of achievements within the same game, showing game_id, the name of the first achievement, and the name of the second achievement.", "sql": null }, { "role": "assistant", "content": "SELECT a1.game_id, a1.name AS achievement1, a2.name AS achi...
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 character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List pairs of documents uploaded by the same lawyer, showing uploader ID and both document names.", "sql": null }, { "role": "assistant", "content": "SELECT d1.uploaded_by_lawyer_id, d1.document_name AS doc1, d2.document_name AS doc2 FROM legal_services.document...
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.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,...
[ { "role": "user", "content": "How many group conversations are there?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.conversations WHERE is_group_chat = TRUE;", "sql": null } ]
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 character varying(64) NOT NULL, case_id chara...
[ { "role": "user", "content": "Show me the count of documents grouped by document_type.", "sql": null }, { "role": "assistant", "content": "SELECT document_type, COUNT(*) AS doc_count\nFROM legal_services.documents\nGROUP BY document_type;", "sql": null }, { "role": "user", "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 legal_services.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c...
[ { "role": "user", "content": "Show me all appointments that have both a non-null location and notes, along with their appointment_id, client_id, lawyer_id, and start_time.", "sql": null }, { "role": "assistant", "content": "SELECT appointment_id, client_id, lawyer_id, start_time FROM legal_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.insurance_products ( product_id.text, product_name.text, product_type.text...
[ { "role": "user", "content": "Display each product alongside the most recently updated product of the same type. Return original_id, original_updated_at, recent_id, recent_updated_at, and product_type.", "sql": null }, { "role": "assistant", "content": "SELECT p.product_id AS original_id, 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 hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex...
[ { "role": "user", "content": "List all payments made using a credit card, including guest_id, amount, payment_method, and payment_timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT guest_id, amount, payment_method, payment_timestamp FROM hospitality_technology.payments 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 government_services.agencies ( agency_id.text, agency_name.text, jurisdiction_level....
[ { "role": "user", "content": "List each payment method, the total amount paid, and the number of payments for each method for services in the 'Education' category.", "sql": null }, { "role": "assistant", "content": "SELECT p.payment_method, SUM(p.amount) AS total_amount, COUNT(p.payment_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": "Find all vehicles that have at least one fuel log and at least one maintenance log. For each vehicle, show vehicle_id, make, model, the date of its most recent maintenance, and the timestamp of its earliest fuel log.", "sql": null }, { "role": "assistant", "cont...
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.service_locations ( location_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "I want to know the total number of appointments per location along with the location name for appointments scheduled in March 2024.", "sql": null }, { "role": "assistant", "content": "SELECT\n sl.location_name,\n COUNT(a.appointment_id) AS appointment_count\nF...
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, property_id c...
[ { "role": "user", "content": "List the names and prices of all services available in the 'Food & Beverage' department.", "sql": null }, { "role": "assistant", "content": "SELECT service_name, price\nFROM hospitality_technology.services\nWHERE department = 'Food & Beverage' AND is_available =...
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, -- unique iden...
[ { "role": "user", "content": "List the medication name and manufacturer of all medications where the description contains the word 'extended'.", "sql": null }, { "role": "assistant", "content": "SELECT medication_name, manufacturer\nFROM healthcare.medications\nWHERE description ILIKE '%exte...
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, user_id.text, wallet_id.text, asset_id.text...
[ { "role": "user", "content": "For each user, calculate the total value of 'buy' and 'sell' orders (quantity * price).", "sql": null }, { "role": "assistant", "content": "SELECT b.user_id,\n b.total_buy_value,\n s.total_sell_value\nFROM (\n SELECT user_id,\n SUM(quantity ...
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.insurance_products ( product_id.text, product_name.text, product_type.text...
[ { "role": "user", "content": "List the first name and last name of all policy beneficiaries, along with the name of the insurance product associated with their policy.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.product_name FROM insurance.polic...
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 PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "List all time entries showing the lawyer's full name, the case name, hours spent, and description.", "sql": null }, { "role": "assistant", "content": "SELECT CONCAT(l.first_name, ' ', l.last_name) AS lawyer_name, c.case_name, te.hours_spent, te.description\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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t...
[ { "role": "user", "content": "List all ERC20 tokens where the total supply is between '1000000000' and '5000000000'. Show the symbol and name.", "sql": null }, { "role": "assistant", "content": "SELECT symbol, name FROM token_metas WHERE is_erc20 = 1 AND total_supply >= '1000000000' AND tota...
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 listed on the 'NYSE' exchange with their ticker symbol and most recent close price.", "sql": null }, { "role": "assistant", "content": "SELECT s.security_name, s.ticker_symbol, md.close_price\nFROM financial_services.securities s\nJOIN fin...
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.assets ( asset_id character varying(64) NOT NULL, name character va...
[ { "role": "user", "content": "Show a list of all asset names along with the current KYC status of each user, including the asset symbol. Join the assets and kyc_audit tables.", "sql": null }, { "role": "assistant", "content": "SELECT a.name AS asset_name, a.symbol, k.user_id, k.status AS kyc...
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": "Which games have the highest average item cost for Legendary rarity items? Please show the game title, genre, and the average cost of those items.", "sql": null }, { "role": "assistant", "content": "SELECT g.title, g.genre, AVG(igi.cost_amount) AS avg_legendary_...
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.metadata ( metadata_id text, asset_id text, key text, value text ) ...
[ { "role": "user", "content": "Which assets have at least two different types of metadata keys, and for each asset, list its asset_id and a comma-separated list of the unique keys?", "sql": null }, { "role": "assistant", "content": "SELECT asset_id, string_agg(DISTINCT key, ', ') AS unique_ke...
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 PRIMARY KEY, national_id_number text,...
[ { "role": "user", "content": "Show the names of all services and the names of their corresponding agencies that are offered at accessible locations in 'Chicago'.", "sql": null }, { "role": "assistant", "content": "SELECT s.service_name, sl.agency_id \nFROM government_services.service_locatio...
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.events ( event_id character varying(64) NOT NULL, contract_id character varying...
[ { "role": "user", "content": "List all token symbols and their total supply for tokens where the total supply is greater than the average total supply of all tokens.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, total_supply FROM web3.tokens WHERE total_supply > (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 erc1155_approval_for_all ( block_number bigint NOT NULL, block_timestamp timestamp(3...
[ { "role": "user", "content": "For wallet address '0xWalletA', list the ERC20 tokens held, showing contract address and amount.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, amount FROM erc20_balances WHERE wallet_address = '0xWalletA';", "sql": null }, ...
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.cases ( case_id character varying(64) NOT NULL, case_number character...
[ { "role": "user", "content": "List all invoices with a total_amount greater than 5000, and show the associated case name and client_id.", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_id, i.invoice_number, i.total_amount, i.client_id, c.case_name\nFROM legal_services.inv...
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.", "sql": null }, { "role": "assistant", "content": "SELECT token_symbol, price, price_change_percentage_6h\nFROM token_dexpool_info\nWHERE chain...
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, policy_id character vary...
[ { "role": "user", "content": "List all claims that have at least one document of type 'INVOICE', including the claim ID, incident date, estimated loss, and the document's file name.", "sql": null }, { "role": "assistant", "content": "SELECT c.claim_id, c.incident_date, c.estimated_loss, d.fi...
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": "Show me invoices with a null `payment_date`. Include invoice number, total amount, and due date.", "sql": null }, { "role": "assistant", "content": "SELECT invoice_number, total_amount, due_date FROM invoices WHERE payment_date IS NULL;", "sql": null }, ...
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": "List all users, showing their user ID, username, and the total number of wallets they have created. Include users who have no wallets.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id, u.username, COUNT(w.wallet_id) AS wallet_count FROM tradi...
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.patient_insurance ( patient_insurance_id character varying(64) NOT NU...
[ { "role": "user", "content": "List the full name of patients whose primary insurance plan is provided by 'BlueCross BlueShield', along with the plan name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T3.plan_name FROM healthcare.patients AS T1 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 web3.wallets ( wallet_id text PRIMARY KEY, user_id text, address text, private_key t...
[ { "role": "user", "content": "List all pairs of wallets with the same creation timestamp but different wallet addresses, including both wallet_ids and the creation timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT w1.wallet_id AS wallet_id_1, w2.wallet_id AS wallet_id_2, ...
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, -- fundraising reco...
[ { "role": "user", "content": "Which month in 2022 saw the highest total fundraising amount, and which project contributed the most to that month's total?", "sql": null }, { "role": "assistant", "content": "WITH monthly_totals AS (\n SELECT \n to_char(to_date(investment_date, 'YYYY-...
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.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "List the reference number and status for all applications that have at least one document associated with them.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT a.reference_number, a.status FROM government_services.applications AS a JOIN gover...
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, username.text, email.text, password_hash.text...
[ { "role": "user", "content": "For each user, show their username and the total number of completed orders they have placed, along with the name of the asset for each order.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, a.name AS asset_name, COUNT(o.order_id) AS compl...
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": "Provide a count of appointments grouped by their current status.", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) FROM government_services.appointments GROUP BY status;", "sql": null } ]
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.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te...
[ { "role": "user", "content": "Show me the total quantity of fuel consumed and the total cost for each vehicle that has fuel log entries, including the vehicle's make and model.", "sql": null }, { "role": "assistant", "content": "SELECT T1.vehicle_id, T2.make, T2.model, SUM(T1.quantity) AS to...
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": "List usernames and the length of their 'bio' field for users whose 'is_verified' status is true.", "sql": null }, { "role": "assistant", "content": "SELECT username, LENGTH(bio) AS bio_length FROM social_media.users WHERE is_verified IS TRUE;", "sql": null ...
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, pro...
[ { "role": "user", "content": "Show me all reservations with more than 2 adults that are confirmed (status = 'Confirmed'), including their check-in dates and total amounts.", "sql": null }, { "role": "assistant", "content": "SELECT r.reservation_id, r.property_id, r.guest_id, r.check_in_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 hospitality_technology.rooms ( room_id character varying(64) NOT NULL, property_id c...
[ { "role": "user", "content": "For each room type, show the total number of completed reservations and the total amount paid, considering only reservations with status 'CheckedOut'.", "sql": null }, { "role": "assistant", "content": "SELECT rt.type_name, COUNT(r.reservation_id) AS reservation...
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.", "sql": null }, { "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 smart_money_profit ( address character varying(100) NOT NULL, -- the user's address ...
[ { "role": "user", "content": "How many distinct addresses achieved a realized_ratio higher than 0.9 last month?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(DISTINCT address) FROM smart_money_profit WHERE realized_ratio > 0.9;", "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 government_services.employees ( employee_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Find employees who were hired after their managers. Display the employee's full name, their hire date, the manager's full name, and the manager's hire date.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name || ' ' || e.last_name AS employee...
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_dexpool_info ( pair_address character varying(512) NOT NULL, token_name charac...
[ { "role": "user", "content": "List all tokens with a liquidity over $1 million and a negative 1-hour price change percentage on the Binance chain.", "sql": null }, { "role": "assistant", "content": "SELECT token_name, token_symbol, price, price_change_percentage_1h, liquidity FROM token_dexp...
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, -- uniqu...
[ { "role": "user", "content": "Find all documents that have a description and list their document ID, file name, and description.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, file_name, description FROM insurance.claim_documents WHERE description IS NOT NULL AND des...
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.", "sql": null }, { "role": "assistant", "content": "SELECT room_number, floor FROM hospitality_technology.rooms WHERE property_id = 'PROP01' AND 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 legal_services.clients ( client_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Which clients have not had any appointments scheduled? Please list their first name, last name, and email.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, c.email\nFROM legal_services.clients c\nLEFT JOIN legal_services.appo...
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": "I want to see pairs of fundraising rounds for projects that have at least two rounds. Please list project_name, earlier_round, earlier_investment, later_round, and later_investment.", "sql": null }, { "role": "assistant", "content": "SELECT\n earlier.project_na...
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": "List each client's first and last name along with the number of cases they have, alias the count as case_count.", "sql": null }, { "role": "assistant", "content": "SELECT cl.first_name, cl.last_name, COUNT(c.case_id) AS case_count\nFROM legal_services.clients cl...
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": "How many users registered in 2024?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM trading_platform.users WHERE DATE_PART('year', created_at) = 2024;", "sql": null } ]
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.trips ( trip_id text PRIMARY KEY, route_id text, vehicle_id text, dri...
[ { "role": "user", "content": "For each passenger, show their full name, email, and the number of unique trips they have participated in.", "sql": null }, { "role": "assistant", "content": "SELECT p.first_name, p.last_name, p.email, COUNT(DISTINCT b.trip_id) AS unique_trips\nFROM transportati...
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 Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,...
[ { "role": "user", "content": "特定の組み立てラインに割り当てられた従業員とそのラインの手順情報を取得したいです。従業員ID、名前、職種と手順名、手順番号を含めてください。", "sql": null }, { "role": "assistant", "content": "db.employees.aggregate([\n { $match: { assigned_line_id: '<specific_line_id>' } },\n { $lookup: {\n from: 'assembly_steps',\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 gaming_technology.servers ( server_id.uuid, game_id.uuid, server_name.text, region.t...
[ { "role": "user", "content": "Find all pairs of servers in the same region hosting different games. Show the server names as server1 and server2 and their respective game_ids.", "sql": null }, { "role": "assistant", "content": "SELECT s1.server_name AS server1, s1.game_id AS game1, s2.server...
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 PRIMARY KEY, national_id_number text,...
[ { "role": "user", "content": "List the first name and last name of citizens along with the type and verification status of their documents.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.document_type, T2.verification_status FROM government_service...
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 text, token_name text, token_symbol text, token_address t...
[ { "role": "user", "content": "Which are the top 3 tokens on BSC by total USD value held by all CEXs, and what is their narrative and current price?", "sql": null }, { "role": "assistant", "content": "SELECT ctb.token_symbol, tbi.narrative, tbi.price, SUM(ctb.usd_value) AS total_usd_value\nFR...
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": "Find all pairs of nodes that share the same ip_address but have different port numbers, include both node IDs, their ports, and the ip_address.", "sql": null }, { "role": "assistant", "content": "SELECT n1.node_id AS node1_id, n2.node_id AS node2_id, n1.ip_addre...
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.notifications ( notification_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Find pairs of notifications for the same application where one was sent via 'Email' and the other via 'SMS'. Display the application_id, email_notification_id, sms_notification_id, email_sent_at, and sms_sent_at.", "sql": null }, { "role": "assistant", "content"...
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, property_id text, room_number text, roo...
[ { "role": "user", "content": "List the names and prices of all services ordered by guests from 'Texas', along with the guest's full name.", "sql": null }, { "role": "assistant", "content": "SELECT g.first_name, g.last_name, s.service_name, s.price\nFROM hospitality_technology.guests g\nJOIN ...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
1