system stringlengths 333 7.66k | 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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "List all 'exists'-status coins from sui_coins_metadata with more than 8 decimals, showing coin_type, symbol, name, and decimals."
},
{
"role": "assistant",
"content": "SELECT coin_type, symbol, name, decimals FROM sui_coins_metadata WHERE status = 'exists' AND decim... |
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 erc20_balances ( block_number bigint NOT NULL, contract_address varchar NOT NULL, wa... | [
{
"role": "user",
"content": "List all NFTs minted on the Ethereum blockchain in the last 14 days, including their contract address, token ID, name, and minter."
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id, name, minter\nFROM nft_metadata\nWHERE blockchain = 'Ethereum... |
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": "For each Sui NFT with status 'exists', show its object ID, collection type, and owner."
},
{
"role": "assistant",
"content": "SELECT object_id, collection_type, owner FROM sui_nfts WHERE status = 'exists';"
},
{
"role": "user",
"content": "Only show NFTs... |
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 ERC20 tokens have more than 8 decimals? Show their symbol, name, and decimals."
},
{
"role": "assistant",
"content": "SELECT symbol, name, decimals\nFROM token_metas\nWHERE is_erc20 = 1 AND decimals > 8;"
},
{
"role": "user",
"content": "Can you al... |
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": "Find the total transfer volume for each Avalanche token over the past 7 days and include the token's creator."
},
{
"role": "assistant",
"content": "SELECT a.tick,\n i.creator,\n SUM(a.amt) AS total_volume\nFROM token_activities_avalanche a\nJOIN token_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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,... | [
{
"role": "user",
"content": "Get the number of distinct wallet holders and total amount held for each NFT collection on Ethereum. Include collection name and contract_address."
},
{
"role": "assistant",
"content": "SELECT nc.contract_address, nc.name, COUNT(DISTINCT nh.wallet_address) AS holder... |
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 erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am... | [
{
"role": "user",
"content": "Find all wallets that hold at least one NFT and also hold ERC-20 tokens."
},
{
"role": "assistant",
"content": "SELECT DISTINCT nh.wallet_address\nFROM nft_holders nh\nJOIN erc20_balances eb\n ON nh.wallet_address = eb.wallet_address;"
},
{
"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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,... | [
{
"role": "user",
"content": "For each SUI coin type, show the total balance across all owners and the number of distinct owners."
},
{
"role": "assistant",
"content": "SELECT\n coin_type,\n SUM(CAST(balance AS DECIMAL)) AS total_balance,\n COUNT(DISTINCT owner) AS owner_count\nFROM sui_coins... |
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 wallet addresses holding NFTs for contract address '0xabcdef...'. Show the wallet address and amount held."
},
{
"role": "assistant",
"content": "SELECT wallet_address, amount, token_id FROM nft_holders WHERE contract_address = '0xabcdef...';"
},
{
... |
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": "Show me the object ID, coin type, and balance for all SUI coins where the status is 'active'."
},
{
"role": "assistant",
"content": "SELECT object_id, coin_type, balance FROM sui_coins WHERE status = 'active'"
},
{
"role": "user",
"content": "Also, 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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern... | [
{
"role": "user",
"content": "Show each player's username and the number of distinct games they have played sessions on."
},
{
"role": "assistant",
"content": "SELECT\n p.username,\n COUNT(DISTINCT gs.game_id) AS games_played\nFROM gaming_technology.players p\nJOIN gaming_technology.game_sessi... |
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": "Show each player and the total number of game sessions they have participated in."
},
{
"role": "assistant",
"content": "SELECT T1.player_id, T1.username, count(T2.session_id) FROM gaming_technology.players AS T1 LEFT JOIN gaming_technology.game_sessions AS T2 ON 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 gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "Retrieve the player_id, username, and game title for all players who have at least one item in their inventory."
},
{
"role": "assistant",
"content": "SELECT DISTINCT p.player_id, p.username, g.title\nFROM gaming_technology.players p\nJOIN gaming_technology.player_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 gaming_technology.players ( player_id uuid, username text, email text, password_hash... | [
{
"role": "user",
"content": "Retrieve the top 5 players by the number of distinct achievements unlocked. Show player_id and distinct_unlocks."
},
{
"role": "assistant",
"content": "SELECT p.player_id, COUNT(DISTINCT pa.achievement_id) AS distinct_unlocks\nFROM gaming_technology.players p\nJOIN ... |
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": "Can you provide a list of all players who have acquired at least one item, along with the item name, its type, and the title of the game that item belongs to?"
},
{
"role": "assistant",
"content": "SELECT pi.player_id, items.item_name, items.item_type, g.title AS ga... |
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": "Which achievements have the highest unlock counts? List the top 5 achievement names along with the number of distinct players who unlocked each."
},
{
"role": "assistant",
"content": "SELECT a.name,\n COUNT(DISTINCT pa.player_id) AS player_count\nFROM gaming_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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "Can you give me a count of players for each player status?"
},
{
"role": "assistant",
"content": "SELECT status, COUNT(player_id) FROM gaming_technology.players GROUP BY status;"
},
{
"role": "user",
"content": "Now, only show me the statuses that have f... |
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": "Which players have unlocked any achievement?"
},
{
"role": "assistant",
"content": "SELECT DISTINCT player_id FROM player_achievements;"
},
{
"role": "user",
"content": "Show me the player ID and the total number of points they've accumulated from all un... |
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": "Could you list the title of each game and the total quantity of items acquired by players for that specific game?"
},
{
"role": "assistant",
"content": "SELECT g.title, SUM(pi.quantity) AS total_acquired_quantity FROM gaming_technology.games g JOIN gaming_technology... |
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.game_sessions ( session_id uuid PRIMARY KEY, player_id uuid, game_... | [
{
"role": "user",
"content": "Show for each player the total score achieved in sessions on each server, and the number of sessions per server."
},
{
"role": "assistant",
"content": "SELECT player_id, server_id, SUM(score) AS total_score, COUNT(*) AS session_count\nFROM gaming_technology.game_ses... |
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": "What is the total amount paid by each customer? Show the customer_id and the sum of amount_paid."
},
{
"role": "assistant",
"content": "SELECT customer_id, SUM(amount_paid) FROM insurance.premium_payments GROUP BY customer_id;"
},
{
"role": "user",
"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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "For each insurance product, can you list its product name, the number of unique agents who have sold policies for that product, and the total premium paid across those policies?"
},
{
"role": "assistant",
"content": "SELECT ip.product_name, COUNT(DISTINCT a.agent_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 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."
},
{
"role": "assistant",
"content": "SELECT p.product_id AS original_id, p.updated_at AS ori... |
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": "How many unique customers are there in the system?"
},
{
"role": "assistant",
"content": "SELECT COUNT(DISTINCT customer_id) AS unique_customer_count\nFROM insurance.customers;"
}
] |
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": "For each policy, find the latest payment date. Show the policy_id and the maximum payment_date."
},
{
"role": "assistant",
"content": "SELECT policy_id, MAX(payment_date) AS latest_payment_date FROM insurance.premium_payments GROUP BY policy_id;"
},
{
"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 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."
},
{
"role": "assistant",
"content": "SELECT cl.claim_id, ip.product_type\nFROM insurance.claims cl\nJOIN insurance.policies p ON cl.policy_id = p.policy_id\nJOIN 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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "List the first and last names, email, and phone number of all customers whose status is not 'Active'."
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email, phone_number\nFROM insurance.customers\nWHERE status <> 'Active';"
},
{
"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 insurance.claims ( claim_id text PRIMARY KEY, policy_id text, customer_id text, inci... | [
{
"role": "user",
"content": "List all active insurance products, including their product name, type, and base premium."
},
{
"role": "assistant",
"content": "SELECT product_name, product_type, base_premium FROM insurance.insurance_products WHERE is_active = TRUE;"
}
] |
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 policy IDs and policy numbers for policies that have a null cancellation reason."
},
{
"role": "assistant",
"content": "SELECT policy_id, policy_number FROM insurance.policies WHERE cancellation_reason IS 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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "Show me the full names and email addresses of all customers who registered after January 1st, 2024."
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email FROM insurance.customers WHERE created_at > '2024-01-01';"
},
{
"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 web3.users ( user_id character varying(64) NOT NULL, username character varying(128)... | [
{
"role": "user",
"content": "List all pairs of users who share the same email domain, showing each pair’s user_id, username, and the common domain."
},
{
"role": "assistant",
"content": "SELECT u1.user_id AS user1_id,\n u1.username AS user1_name,\n u2.user_id AS user2_id,\n u2... |
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 PRIMARY KEY, token_id text, from_address tex... | [
{
"role": "user",
"content": "For each recipient address, count how many token transfers they have received."
},
{
"role": "assistant",
"content": "SELECT to_address, COUNT(*) AS received_transfer_count FROM web3.token_transfers GROUP BY to_address;"
},
{
"role": "user",
"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 web3.users ( user_id.text, username.text, email.text, password_hash.text, created_at... | [
{
"role": "user",
"content": "For each user, show how many users registered after them. Return the user_id, username, and the count of later registrants."
},
{
"role": "assistant",
"content": "SELECT u1.user_id, u1.username, COUNT(u2.user_id) AS later_user_count FROM web3.users u1 LEFT JOIN web3... |
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 text, contract_id text, event_name text, data text, emitted_a... | [
{
"role": "user",
"content": "For each wallet, show the wallet address and the total value of tokens they have received across all token transfers."
},
{
"role": "assistant",
"content": "SELECT w.address, COALESCE(SUM(tt.value), 0) AS total_received_value\nFROM web3.wallets w\nLEFT JOIN web3.tok... |
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 PRIMARY KEY, token_id text, from_address tex... | [
{
"role": "user",
"content": "Show me the top 10 token transfers by value, including the token ID and the transaction ID, sorted in descending order."
},
{
"role": "assistant",
"content": "SELECT token_id, transaction_id, value FROM web3.token_transfers ORDER BY value DESC LIMIT 10;"
}
] |
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 character varying(64) NOT NULL, username character varying(128)... | [
{
"role": "user",
"content": "For each user, find the previous user by registration time. List current user_id and username, previous user_id and username, and the time difference in minutes between their registrations."
},
{
"role": "assistant",
"content": "SELECT u.user_id AS current_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 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."
},
{
"role": "assistant",
"content": "SELECT w1.wallet_id AS wallet_id_1, w2.wallet_id AS wallet_id_2, w1.created_at\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 web3.contracts ( contract_id text, address text, abi text, bytecode text, deployer_a... | [
{
"role": "user",
"content": "For each contract, list the contract address, the number of different tokens deployed on that address, and the sum of total_supply of those tokens."
},
{
"role": "assistant",
"content": "SELECT c.address AS contract_address, COUNT(DISTINCT t.token_id) AS token_count... |
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 all users who registered before 2023-01-01, along with their usernames and registration dates."
},
{
"role": "assistant",
"content": "SELECT user_id, username, created_at\nFROM web3.users\nWHERE created_at < '2023-01-01';"
},
{
"role": "user",
"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 web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "Find all tokens with their contract addresses and the number of wallets that hold each token, sorted by wallet count in descending order."
},
{
"role": "assistant",
"content": "SELECT t.token_id, t.contract_address, COUNT(DISTINCT w.wallet_id) AS wallet_count FROM w... |
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 text, citizen_id text, service_id ... | [
{
"role": "user",
"content": "List the reference_number and status for all applications assigned to employee 'emp200', along with the submitted_at date of each application."
},
{
"role": "assistant",
"content": "SELECT reference_number, status, submitted_at FROM government_services.applications ... |
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": "Which agencies offer services in the 'Social Assistance' category? Show the agency name and the service name."
},
{
"role": "assistant",
"content": "SELECT a.agency_name, s.service_name\nFROM government_services.services s\nJOIN government_services.agencies a ON s.a... |
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 text, agency_id text, location_n... | [
{
"role": "user",
"content": "Find the service locations that are not accessible and located in the state of 'California'. List their name, address, and city."
},
{
"role": "assistant",
"content": "SELECT location_name , address , city FROM government_services.service_locations WHERE is_access... |
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 full names and contact emails of all citizens who have made a payment for an application that is currently in 'Pending' status."
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.first_name || ' ' || c.last_name AS full_name, c.contact_email\nFROM gov... |
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": "Retrieve each agency’s name along with the count of accessible service locations it has in California."
},
{
"role": "assistant",
"content": "SELECT\n a.agency_name,\n COUNT(l.location_id) AS accessible_location_count\nFROM government_services.agencies a\nJOIN gov... |
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.text, citizen_id.text, applicati... | [
{
"role": "user",
"content": "Find pairs of notifications for the same citizen where one was sent via 'Email' and another via 'SMS'. Display citizen_id, email_notification_id, sms_notification_id, email_sent_at, and sms_sent_at."
},
{
"role": "assistant",
"content": "SELECT e.citizen_id,\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 government_services.notifications ( notification_id.text, citizen_id.text, applicati... | [
{
"role": "user",
"content": "For each application that has at least one failed notification, provide the application ID, the total number of notifications received for that application, and the count of failed notifications."
},
{
"role": "assistant",
"content": "SELECT application_id, COUNT(*)... |
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": "Which services charge more than the average standard fee of their category? Show the service name, its fee, and the average fee for that category."
},
{
"role": "assistant",
"content": "SELECT\n s.service_name,\n s.standard_fee,\n avg_fees.avg_fee\nFROM governmen... |
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": "Find pairs of active services from the same agency where one service's average processing time is longer than the other's. Display the agency_id, the slower service name with its processing time, and the faster service name with its processing time."
},
{
"role": "assis... |
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 me the first and last names of citizens along with their dates of birth and contact emails for all citizens who registered after January 1, 2023."
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, date_of_birth, contact_email FROM government_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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "List the contact phone and website for all insurance plans provided by 'Continental Health'."
},
{
"role": "assistant",
"content": "SELECT plan_name, contact_phone, website\nFROM healthcare.insurance_plans\nWHERE insurance_provider = 'Continental Health';"
}
] |
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": "I need to find all pairs of diagnoses for the same patient where one diagnosis is chronic and the other is non-chronic. Show patient_id, chronic diagnosis_id as chronic_id, non-chronic diagnosis_id as acute_id, chronic diagnosis_date, and acute diagnosis_date."
},
{
"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 healthcare.appointments (
appointment_id character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "For each scheduled appointment, list the appointment_id, appointment_time, patient_id, and the name of the patient's primary insurance plan. Only include appointments that have not been cancelled."
},
{
"role": "assistant",
"content": "SELECT a.appointment_id,\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.doctors ( doctor_id character varying(64) NOT NULL, first_name character ... | [
{
"role": "user",
"content": "Can you show me the count of new doctors added each month in 2023? Return the month and number of doctors."
},
{
"role": "assistant",
"content": "SELECT DATE_TRUNC('month', created_at) AS month, COUNT(*) AS doctor_count\nFROM healthcare.doctors\nWHERE created_at >= ... |
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": "List each patient's first and last name along with the insurance plan name they are enrolled in, including only primary policies. Return patient_id, first_name, last_name, and plan_name."
},
{
"role": "assistant",
"content": "SELECT p.patient_id,\n p.first_nam... |
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": "List the NDC code and description for any medication that has an NDC code starting with '5'."
},
{
"role": "assistant",
"content": "SELECT ndc_code, description FROM healthcare.medications WHERE ndc_code LIKE '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 healthcare.medications (
medication_id character varying(64) NOT NULL, -- unique... | [
{
"role": "user",
"content": "List the medication_id, medication_name, and description for all medications whose generic_name starts with 'A'."
},
{
"role": "assistant",
"content": "SELECT medication_id, medication_name, description\nFROM healthcare.medications\nWHERE generic_name LIKE 'A%';"
... |
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": "Show the record_id, patient_id, record_date and systolic blood pressure from vitals for all medical records where the systolic blood pressure is above 140."
},
{
"role": "assistant",
"content": "SELECT record_id, patient_id, record_date, (vitals->>'systolic')::INT A... |
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 character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "Which doctors have issued prescriptions with a route of 'Oral'? Please show doctor_id and the number of such prescriptions they have written."
},
{
"role": "assistant",
"content": "SELECT doctor_id, COUNT(*) AS oral_prescription_count\nFROM healthcare.prescriptions\... |
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, patient_id ... | [
{
"role": "user",
"content": "Show the total number of appointments created in 2024 for each doctor and each status."
},
{
"role": "assistant",
"content": "SELECT doctor_id, status, COUNT(*) AS appointment_count FROM healthcare.appointments WHERE EXTRACT(YEAR FROM created_at) = 2024 GROUP BY doc... |
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": "List all employees hired in 2023 along with their job title and email."
},
{
"role": "assistant",
"content": "SELECT employee_id, first_name, last_name, job_title, email\nFROM financial_services.employees\nWHERE EXTRACT(YEAR FROM hire_date) = 2023;"
},
{
"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 financial_services.securities (
security_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "List pairs of securities that trade on different exchanges but belong to the same sector, showing ticker_symbol of both as symbol_a and symbol_b, their exchanges, and the sector."
},
{
"role": "assistant",
"content": "SELECT a.ticker_symbol AS symbol_a, a.exchange A... |
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 PRIMARY KEY, customer_id text, account... | [
{
"role": "user",
"content": "Show me the average interest rate for each account_type."
},
{
"role": "assistant",
"content": "SELECT account_type, AVG(interest_rate) AS average_interest_rate\nFROM financial_services.accounts\nGROUP BY account_type;"
},
{
"role": "user",
"content": "O... |
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.transactions ( transaction_id character varying(64) NOT NULL, acc... | [
{
"role": "user",
"content": "Show me all transactions with a status of 'FAILED' that occurred within the last 7 days."
},
{
"role": "assistant",
"content": "SELECT * FROM financial_services.transactions WHERE status = 'FAILED' AND transaction_date >= NOW() - INTERVAL '7 day';"
},
{
"rol... |
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 PRIMARY KEY, first_name text, last_n... | [
{
"role": "user",
"content": "Show me a summary of customers with their total account balance and the count of accounts."
},
{
"role": "assistant",
"content": "SELECT c.first_name, c.last_name, COUNT(a.account_id) AS account_count, SUM(a.balance) AS total_account_balance FROM financial_services.... |
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": "Can you provide a breakdown of total and average account balance by account_type and currency for each account status?"
},
{
"role": "assistant",
"content": "SELECT account_type, currency, status, COUNT(*) AS total_accounts, SUM(balance) AS total_balance, AVG(balanc... |
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, customer_id... | [
{
"role": "user",
"content": "What is the total balance for each currency in the accounts table?"
},
{
"role": "assistant",
"content": "SELECT currency, SUM(balance) AS total_balance FROM financial_services.accounts GROUP BY currency;"
},
{
"role": "user",
"content": "Can you also sh... |
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": "Find customers who have accounts in more than one currency. List their customer_id and the count of distinct currencies they hold accounts in."
},
{
"role": "assistant",
"content": "SELECT customer_id, COUNT(DISTINCT currency) AS distinct_currency_count FROM financi... |
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": "I need a report showing each security's ticker_symbol along with the total sum of trade total_amount and the count of trades executed in the last three months."
},
{
"role": "assistant",
"content": "SELECT s.ticker_symbol, SUM(t.total_amount) AS total_trade_amount, ... |
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": "List pairs of securities from the same issuer where one security was updated within the last 30 days, and the other was updated more than 90 days ago. Show issuer name, ticker symbols, and last_updated timestamps for both."
},
{
"role": "assistant",
"content": "SELE... |
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": "Show me all time entries where the hours spent is greater than 5."
},
{
"role": "assistant",
"content": "SELECT entry_id, date_worked, hours_spent, description FROM legal_services.time_entries WHERE hours_spent > 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 legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List each partner lawyer's first_name, last_name along with the count of invoices for the cases they lead."
},
{
"role": "assistant",
"content": "SELECT l.lawyer_id, l.first_name, l.last_name, COUNT(i.invoice_id) AS invoice_count\nFROM legal_services.lawyers l\nJOIN... |
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": "Show me the names of all law firms and the total number of lawyers associated with each firm."
},
{
"role": "assistant",
"content": "SELECT T1.firm_name, count(T2.lawyer_id) FROM legal_services.law_firms AS T1 JOIN legal_services.lawyers AS T2 ON T1.firm_id = T2.fir... |
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."
},
{
"role": "assistant",
"content": "SELECT cl.first_name, cl.last_name, COUNT(c.case_id) AS case_count\nFROM legal_services.clients cl\nLEFT JOIN legal... |
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.text, firm_name.text, address.text, phone.text, w... | [
{
"role": "user",
"content": "List all law firms that do not have a website registered, including their firm name and phone."
},
{
"role": "assistant",
"content": "SELECT firm_name, phone\nFROM legal_services.law_firms\nWHERE website IS NULL OR website = '';"
}
] |
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.time_entries ( entry_id text, case_id text, lawyer_id text, date_work... | [
{
"role": "user",
"content": "List all invoices with a total_amount less than 1000 and show the associated client's ID and case ID."
},
{
"role": "assistant",
"content": "SELECT invoice_id, client_id, case_id, total_amount\nFROM legal_services.invoices\nWHERE total_amount < 1000;"
},
{
"... |
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": "Show me each invoice and the invoice_number of the next invoice for the same client, along with how many days apart their issue_dates are."
},
{
"role": "assistant",
"content": "SELECT a.invoice_number AS invoice_number,\n b.invoice_number AS next_invoice_numb... |
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.time_entries ( entry_id text PRIMARY KEY, case_id text, lawyer_id tex... | [
{
"role": "user",
"content": "Show me all time entries for case ID 'case_abc', including the entry ID, date worked, hours spent, and the first and last name of the lawyer."
},
{
"role": "assistant",
"content": "SELECT te.entry_id, te.date_worked, te.hours_spent, l.first_name, l.last_name FROM le... |
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 PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List all cases where the client and the lead lawyer belong to companies or law firms with the same phone number. For each such case, please show the case name, client name, client company, lead lawyer name, and the shared phone number."
},
{
"role": "assistant",
"co... |
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": "I want to find all pairs of invoices belonging to the same client. Show me the client_id, the invoice_number for the earlier invoice and the invoice_number for the later invoice."
},
{
"role": "assistant",
"content": "SELECT i1.client_id,\n i1.invoice_number A... |
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.text, user_id.text, address.text, private_key.t... | [
{
"role": "user",
"content": "For each user, show their user ID and the count of unique wallet addresses they own."
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(DISTINCT address) FROM wallets GROUP 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 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 trading_platform.wallets ( wallet_id.text, user_id.text, address.text, private_key.t... | [
{
"role": "user",
"content": "Give me a count of log entries for each user."
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(*) AS log_count\nFROM trading_platform.logs\nGROUP BY user_id;"
},
{
"role": "user",
"content": "Only show users who have more than 10 log entries.... |
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 text, user_id text, address text, private_key t... | [
{
"role": "user",
"content": "List user IDs with approved KYC status and the addresses of their wallets."
},
{
"role": "assistant",
"content": "SELECT DISTINCT w.user_id, w.address FROM trading_platform.wallets w JOIN trading_platform.kyc_audit k ON w.user_id = k.user_id WHERE k.status = 'approv... |
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": "List all unique actions that have been logged in the system."
},
{
"role": "assistant",
"content": "SELECT DISTINCT action FROM trading_platform.logs;"
}
] |
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": "List all DApps along with the number of metadata entries linked to each, even if the DApp has no linked metadata."
},
{
"role": "assistant",
"content": "SELECT d.name, d.url, COUNT(m.metadata_id) AS metadata_count\nFROM trading_platform.dapps d\nLEFT JOIN trading_pl... |
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 text, user_id text, address text, private_key t... | [
{
"role": "user",
"content": "I want a summary of each asset showing the total number of trades executed and the average trade price, including asset name and symbol."
},
{
"role": "assistant",
"content": "SELECT a.asset_id,\n a.name,\n a.symbol,\n COUNT(t.trade_id) AS trades_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 trading_platform.orders ( order_id text PRIMARY KEY, user_id text, wallet_id text, a... | [
{
"role": "user",
"content": "Show me the total count and sum of amounts for spent and unspent UTXOs for each asset, including the asset name and symbol."
},
{
"role": "assistant",
"content": "SELECT a.asset_id, a.name AS asset_name, a.symbol, u.spent, COUNT(*) AS utxo_count, SUM(u.amount) 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 trading_platform.users ( user_id.text, username.text, email.text, password_hash.text... | [
{
"role": "user",
"content": "Show the email address and the creation date for every user, ordered by their username alphabetically."
},
{
"role": "assistant",
"content": "SELECT email, created_at FROM trading_platform.users ORDER BY username ASC;"
}
] |
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.notifications ( notification_id text, user_id text, message text, s... | [
{
"role": "user",
"content": "Show me all notifications sent in the last 7 days, including the user ID and message."
},
{
"role": "assistant",
"content": "SELECT user_id, message, sent_at FROM trading_platform.notifications WHERE sent_at >= NOW() - INTERVAL '7 days';"
},
{
"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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti... | [
{
"role": "user",
"content": "Show me all wallet addresses that hold more than 3 different NFTs from any ERC1155 contract. For each wallet, list the contract address and the count of distinct token_ids."
},
{
"role": "assistant",
"content": "SELECT contract_address, wallet_address, COUNT(DISTINC... |
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": "Show me the total amount held and number of unique wallets for each ERC20 token with a symbol ending in 'X'."
},
{
"role": "assistant",
"content": "SELECT tm.symbol, SUM(CAST(ebh.amount AS DECIMAL)) AS total_amount, COUNT(DISTINCT ebh.wallet_address) AS unique_walle... |
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": "List all Avalanche tokens where the circulating total supply is less than the maximum supply. Include tick, creator, max_supply, total_supply (sum of amount), and the difference between max_supply and total_supply."
},
{
"role": "assistant",
"content": "SELECT bi.ti... |
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": "List all NFT holdings from the `nft_holders` table where the `contract_type` is 'ERC721'. Show the wallet address, contract address, token ID, and amount held."
},
{
"role": "assistant",
"content": "SELECT wallet_address, contract_address, token_id, CAST(amount AS 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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... | [
{
"role": "user",
"content": "Show me the top 5 NFT collections on Ethereum with the highest number of unique owners, along with their names and floor prices."
},
{
"role": "assistant",
"content": "SELECT nc.name, nc.floor_price, COUNT(DISTINCT nh.wallet_address) AS unique_owners FROM nft_collec... |
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": "Which wallets currently hold more than 100 units of any ERC1155 NFT on Ethereum? Please show contract address, token id, wallet address, and amount."
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id, wallet_address, CAST(amount AS NUMERIC) 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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... | [
{
"role": "user",
"content": "List all wallet addresses that hold SUI coins with a balance greater than 1,000,000. Please show the coin_type as well."
},
{
"role": "assistant",
"content": "SELECT owner, coin_type, balance\nFROM sui_coins\nWHERE CAST(balance AS DECIMAL) > 1000000;"
},
{
"... |
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": "Get all active SUI coins with their owner and balance."
},
{
"role": "assistant",
"content": "SELECT coin_type, owner, balance\nFROM sui_coins\nWHERE status = 'active';"
},
{
"role": "user",
"content": "Join metadata to include the coin symbol and decima... |
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": "Show the contract address, symbol, and current total supply for all Avalanche tokens from token_balances_avalanche."
},
{
"role": "assistant",
"content": "SELECT tick AS contract_address, tick AS symbol, SUM(total_supply) AS current_total_supply\nFROM token_balances... |
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": "List all NFTs minted in the last 30 days, including their contract address, token id, and minter address."
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id, minter FROM nft_metadata WHERE mint_time >= (strftime('%s', 'now') - 2592000);"
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.