conversations listlengths 2 8 | system stringlengths 288 6.88k |
|---|---|
[
{
"role": "user",
"content": "List the count of events for each contract deployed by address '0x123abc...'"
},
{
"role": "assistant",
"content": "SELECT c.address, COUNT(e.event_id) FROM web3.contracts c JOIN web3.events e ON c.contract_id = e.contract_id WHERE c.deployer_address = '0x123abc...'... | You are an expert in writing database language. You can write a corresponding 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": "List the user ID and username for all users, ordered by username alphabetically."
},
{
"role": "assistant",
"content": "SELECT user_id, username FROM blockchain.users ORDER BY username ASC;"
},
{
"role": "user",
"content": "From that list, only show 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 blockchain.users ( user_id.text, username.text, email.text, password_hash.text )
|
[
{
"role": "user",
"content": "Find the user ID with the most wallets and list their user ID and the total number of wallets they have."
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(wallet_id) AS wallet_count FROM web3.wallets GROUP BY user_id ORDER BY wallet_count DESC LIMIT 1;"
... | You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, user_id character varying(6... |
[
{
"role": "user",
"content": "List all event names and their corresponding transaction IDs for events that occurred in July 2024."
},
{
"role": "assistant",
"content": "SELECT event_name, transaction_id FROM web3.events WHERE emitted_at >= '2024-07-01 00:00:00' AND emitted_at < '2024-08-01 00:00... | You are an expert in writing database language. You can write a corresponding 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": "List all users who have received any notification, showing their username and the total number of notifications they received. Assume a users table with user_id and username exists."
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(n.notification_id) 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 trading_platform.utxos ( utxo_id text PRIMARY KEY, transaction_id text, output_index... |
[
{
"role": "user",
"content": "List the node ID, IP address, and port for all nodes last seen after '2024-06-01'."
},
{
"role": "assistant",
"content": "SELECT node_id, ip_address, port FROM blockchain.nodes WHERE last_seen > '2024-06-01';"
},
{
"role": "user",
"content": "How many no... | You are an expert in writing database language. You can write a corresponding 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.transactions ( transaction_id text, block_id text, sender_address text, r... |
[
{
"role": "user",
"content": "List all users and the total quantity of orders they have placed for 'buy' orders."
},
{
"role": "assistant",
"content": "SELECT t1.username, SUM(t2.quantity) FROM trading_platform.users AS t1 JOIN trading_platform.orders AS t2 ON t1.user_id = t2.user_id WHERE t2.or... | You are an expert in writing database language. You can write a corresponding 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 me the name of each narrative and its 24-hour price change percentage."
},
{
"role": "assistant",
"content": "SELECT narrative, price_change_percentage_24h FROM narrative_info"
},
{
"role": "user",
"content": "Now, filter the list to only include 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 token_basic_info ( coin_id.text, token_name.text, token_symbol.text, token_address.t... |
[
{
"role": "user",
"content": "List the block ID and timestamp for all blocks that were mined after 2023-01-01 and also show the ID and timestamp of their direct successor block."
},
{
"role": "assistant",
"content": "SELECT t1.block_id, t1.timestamp, t2.block_id AS successor_block_id, t2.timesta... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE blockchain.blocks ( block_id text, previous_block_id text, timestamp timestamp, nonc... |
[
{
"role": "user",
"content": "What is the average difficulty and the maximum nonce value for all blocks recorded?"
},
{
"role": "assistant",
"content": "SELECT AVG(difficulty), MAX(nonce) FROM blockchain.blocks"
}
] | You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id text, previous_block_id text, timestamp timestamp, nonc... |
[
{
"role": "user",
"content": "List all usernames and the ID of the wallets they own."
},
{
"role": "assistant",
"content": "SELECT t1.username, t2.wallet_id FROM blockchain.users AS t1 INNER JOIN blockchain.wallets AS t2 ON t1.user_id = t2.user_id;"
},
{
"role": "user",
"content": "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 blockchain.transactions ( transaction_id text, block_id text, sender_address text, r... |
[
{
"role": "user",
"content": "Show me the name of all NFTs and their collection names for collections named 'CryptoPunks'."
},
{
"role": "assistant",
"content": "SELECT t1.name AS nft_name, t2.name AS collection_name FROM nft_metadata AS t1 JOIN nft_collections AS t2 ON t1.contract_address = t2.... | You are an expert in writing database language. You can write a corresponding 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 Sui coins owned by address '0xabc...xyz', list the balance and their symbol by joining the coins and metadata tables."
},
{
"role": "assistant",
"content": "SELECT T1.balance, T2.symbol FROM sui_coins AS T1 JOIN sui_coins_metadata AS T2 ON T1.coin_type = T2.coin... | You are an expert in writing database language. You can write a corresponding 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 unspent transaction outputs (UTXOs), showing their transaction ID and amount."
},
{
"role": "assistant",
"content": "SELECT transaction_id, amount FROM trading_platform.utxos WHERE spent = false;"
},
{
"role": "user",
"content": "Calculate the 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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ... |
[
{
"role": "user",
"content": "List all trades, including the status of the corresponding order."
},
{
"role": "assistant",
"content": "SELECT t.trade_id, t.order_id, o.status FROM trading_platform.trades t JOIN trading_platform.orders o ON t.order_id = o.order_id;"
},
{
"role": "user",
... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.wallets ( wallet_id text PRIMARY KEY, user_id text, address text, p... |
[
{
"role": "user",
"content": "Show me the deployer address and the count of contracts they have deployed on the 'mainnet' network, but only for deployers who have deployed more than 5 contracts on mainnet. Sort the results by the count in descending order."
},
{
"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 web3.contracts ( contract_id text PRIMARY KEY, address text, abi text, bytecode text... |
[
{
"role": "user",
"content": "List all users along with their associated wallet addresses."
},
{
"role": "assistant",
"content": "SELECT u.username, w.address FROM trading_platform.users u JOIN trading_platform.wallets w ON u.user_id = w.user_id;"
},
{
"role": "user",
"content": "Now... | You are an expert in writing database language. You can write a corresponding 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": "Find all NFTs with a rarity rank less than 100 and show their name and the name of their collection."
},
{
"role": "assistant",
"content": "SELECT nm.name AS nft_name, nc.name AS collection_name FROM nft_metadata nm JOIN nft_collections nc ON nm.contract_address = n... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... |
[
{
"role": "user",
"content": "Show me the total number of users."
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM web3.users;"
},
{
"role": "user",
"content": "Now, show me the username and email address for the user with the most recently created account."
},
{
"r... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.users ( user_id text PRIMARY KEY, username text, email text, password_hash text... |
[
{
"role": "user",
"content": "What is the timestamp of the most recent log entry for each user?"
},
{
"role": "assistant",
"content": "SELECT user_id, MAX(logged_at) AS latest_log_time FROM logs GROUP BY user_id;"
},
{
"role": "user",
"content": "For each user, show the action and 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 trading_platform.logs ( log_id.text, user_id.text, action.text, details.text, logged... |
[
{
"role": "user",
"content": "List the transaction IDs and timestamps for all transactions sent to the contract address of the token with the symbol 'USDC'."
},
{
"role": "assistant",
"content": "SELECT T1.transaction_id, T1.timestamp FROM web3.transactions AS T1 JOIN web3.tokens AS T2 ON T1.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 web3.transactions ( transaction_id.text, from_address.text, to_address.text, value.n... |
[
{
"role": "user",
"content": "How many wallets were created in the year 2023?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM web3.wallets WHERE created_at >= '2023-01-01 00:00:00' AND created_at < '2024-01-01 00:00:00';"
},
{
"role": "user",
"content": "Okay, instead of ... | You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique identifier f... |
[
{
"role": "user",
"content": "List tokens that exist in both the token basic information and the DEX pool information tables. For these tokens, show their symbol, the chain they are on, the current price from basic info, and the liquidity from the DEX pool info."
},
{
"role": "assistant",
"conte... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id.text, token_name.text, token_symbol.text, token_address.t... |
[
{
"role": "user",
"content": "List the name and latest price for all tokens that have a price listed."
},
{
"role": "assistant",
"content": "SELECT t1.name, t2.price FROM token_metas AS t1 JOIN token_prices AS t2 ON t1.contract_address = t2.address WHERE t2.timestamp IN (SELECT MAX(timestamp) FR... | You are an expert in writing database language. You can write a corresponding 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": "How many smart money addresses are recorded for each chain?"
},
{
"role": "assistant",
"content": "SELECT chain, COUNT(address) FROM smart_money_profit GROUP BY chain;"
},
{
"role": "user",
"content": "Now, only show chains that have more than 100 record... | You are an expert in writing database language. You can write a corresponding 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": "Show the name and description for all dapps."
},
{
"role": "assistant",
"content": "SELECT name, description FROM trading_platform.dapps;"
},
{
"role": "user",
"content": "Refine this to show only dapps whose description contains the word 'management'."
... | You are an expert in writing database language. You can write a corresponding 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 the names of NFT collections and the wallet addresses that hold NFTs from those collections."
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.name, T2.wallet_address FROM nft_collections AS T1 JOIN nft_holder_historical AS T2 ON T1.contract_address = 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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... |
[
{
"role": "user",
"content": "List all transaction IDs, sender addresses, and amounts for transactions received by '0xFEDCBA9876543210FEDCBA9876543210FEDCBA98' between '2023-01-01' and '2023-03-31'."
},
{
"role": "assistant",
"content": "SELECT transaction_id, sender_address, amount FROM blockch... | You are an expert in writing database language. You can write a corresponding 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.transactions (
transaction_id character varying(64) NOT NULL, -- uni... |
[
{
"role": "user",
"content": "List the block ID, timestamp, and difficulty for all blocks created before '2024-01-01', ordered by timestamp in descending order."
},
{
"role": "assistant",
"content": "SELECT block_id, timestamp, difficulty FROM blockchain.blocks WHERE timestamp < '2024-01-01' ORD... | You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id.text, previous_block_id.text, timestamp.timestamp, nonc... |
[
{
"role": "user",
"content": "Show me the user ID, wallet address, and transaction ID for the first 20 transactions sent from any user's wallet."
},
{
"role": "assistant",
"content": "SELECT W.user_id, W.address, T.transaction_id FROM web3.wallets W JOIN web3.transactions T ON W.address = T.from... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.transactions ( transaction_id text PRIMARY KEY, from_address text, to_address t... |
[
{
"role": "user",
"content": "Show me all records from the project fundraising table, listing the project name, rounds name, and investment value."
},
{
"role": "assistant",
"content": "SELECT project_name, rounds_name, investment_value FROM project_fundraising_record;"
},
{
"role": "use... | You are an expert in writing database language. You can write a corresponding 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 me all transactions that occurred in the last week."
},
{
"role": "assistant",
"content": "SELECT * FROM web3.transactions WHERE timestamp >= NOW() - INTERVAL '7 days';"
},
{
"role": "user",
"content": "From that list, only show the ones with a stat... | You are an expert in writing database language. You can write a corresponding 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": "Show me the user ID, wallet ID, contract ID, creator address, and timestamp for smart contracts created by addresses associated with any wallet."
},
{
"role": "assistant",
"content": "SELECT w.user_id, w.wallet_id, sc.contract_id, sc.creator_address, sc.timestamp FR... | You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id.text, previous_block_id.text, timestamp.timestamp, nonc... |
[
{
"role": "user",
"content": "List all distinct email domains found in the user email addresses."
},
{
"role": "assistant",
"content": "SELECT DISTINCT SUBSTRING(email, INSTR(email, '@') + 1) AS email_domain FROM web3.users;"
},
{
"role": "user",
"content": "For each domain, show the... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.users ( user_id.text, username.text, email.text, password_hash.text, created_at... |
[
{
"role": "user",
"content": "List tokens associated with the 'AI' narrative. For each token, show its symbol and current price. Also include the 24-hour volume for the 'AI' narrative itself."
},
{
"role": "assistant",
"content": "SELECT T1.token_symbol, T1.price, T2.volume_24h FROM token_basic_... | You are an expert in writing database language. You can write a corresponding 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": "List the usernames and emails for users created in the last year."
},
{
"role": "assistant",
"content": "SELECT username, email FROM web3.users WHERE created_at >= NOW() - INTERVAL '1 year';"
},
{
"role": "user",
"content": "Filter this list to only incl... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.users ( user_id character varying(64) NOT NULL, username character varying(128)... |
[
{
"role": "user",
"content": "Count users whose email address ends with '.com'."
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM web3.users WHERE email LIKE '%.com';"
},
{
"role": "user",
"content": "Now, show me the username and email for those users instead of just the 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 web3.users ( user_id.text, username.text, email.text, password_hash.text, created_at... |
[
{
"role": "user",
"content": "Show pairs of fundraising records for the same project, including the round names and their investment values."
},
{
"role": "assistant",
"content": "SELECT T1.project_name, T1.rounds_name AS round1, T1.investment_value AS value1, T2.rounds_name AS round2, T2.invest... | You are an expert in writing database language. You can write a corresponding 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, -- fundrai... |
[
{
"role": "user",
"content": "Show me the user ID, username, and email for all users."
},
{
"role": "assistant",
"content": "SELECT user_id, username, email FROM blockchain.users;"
},
{
"role": "user",
"content": "Now, only show the users whose username starts with 'alpha'."
},
{... | You are an expert in writing database language. You can write a corresponding 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.users ( user_id.text, username.text, email.text, password_hash.text )
|
[
{
"role": "user",
"content": "What is the total USD value of smart money token inflows for each chain?"
},
{
"role": "assistant",
"content": "SELECT chain, SUM(usd_value) AS total_usd_inflow FROM smart_money_token_inflow GROUP BY chain ORDER BY total_usd_inflow DESC;"
},
{
"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 smart_money_token_inflow ( token_address text, token_symbol text, token_amount numer... |
[
{
"role": "user",
"content": "Find projects that have both fundraising records and basic token information. Display the project name, fundraising round name, investment value, and the token's current price."
},
{
"role": "assistant",
"content": "SELECT T1.project_name, T1.rounds_name, T1.investm... | You are an expert in writing database language. You can write a corresponding 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 me the wallet ID and address for user 'user_abc'."
},
{
"role": "assistant",
"content": "SELECT wallet_id, address FROM web3.wallets WHERE user_id = 'user_abc';"
},
{
"role": "user",
"content": "Could you sort those wallets by their creation date in... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.wallets ( wallet_id text, user_id text, address text, private_key text, created... |
[
{
"role": "user",
"content": "For the ticker 'doge', what are the different types of activities recorded in the `token_activities_bitcoin` table?"
},
{
"role": "assistant",
"content": "SELECT DISTINCT type FROM token_activities_bitcoin WHERE tick = 'doge'"
},
{
"role": "user",
"conte... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE erc20_balances_historical ( block_number.bigint, contract_address.text, wallet_addre... |
[
{
"role": "user",
"content": "Provide the contract ID, creator address, and timestamp for all smart contracts created between January 1st, 2022, and December 31st, 2024."
},
{
"role": "assistant",
"content": "SELECT contract_id, creator_address, timestamp FROM blockchain.smart_contracts WHERE 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 blockchain.smart_contracts ( contract_id.text, creator_address.text, code.text, time... |
[
{
"role": "user",
"content": "List smart money addresses, their chain, and profit for those who have incurred a loss. Order the results by the magnitude of the loss (smallest profit value first)."
},
{
"role": "assistant",
"content": "SELECT address, chain, profit FROM smart_money_profit WHERE 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 smart_money_profit ( address character varying(100) NOT NULL, rank INT, profit numer... |
[
{
"role": "user",
"content": "Show me assets along with their associated 'symbol' metadata value. Assume an assets table with asset_id exists."
},
{
"role": "assistant",
"content": "SELECT a.asset_id, m.value FROM assets a JOIN metadata m ON a.asset_id = m.asset_id WHERE m.key = 'symbol'"
},
... | You are an expert in writing database language. You can write a corresponding 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.utxos ( utxo_id text PRIMARY KEY, transaction_id text, output_index... |
[
{
"role": "user",
"content": "What is the total number of entries in the addresses table and the sum of all balances?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*), SUM(balance) FROM blockchain.addresses;"
},
{
"role": "user",
"content": "Instead of the sum, could you show m... | You are an expert in writing database language. You can write a corresponding 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.addresses (
address_id character varying(128) NOT NULL, -- unique id... |
[
{
"role": "user",
"content": "List all distinct project names found in the fundraising records."
},
{
"role": "assistant",
"content": "SELECT DISTINCT project_name FROM project_fundraising_record;"
},
{
"role": "user",
"content": "For each project, count how many fundraising rounds 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 project_fundraising_record (",
"id character varying(32) NOT NULL, -- fundrai... |
[
{
"role": "user",
"content": "List all users and the count of wallets they own."
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(w.wallet_id) AS wallet_count FROM blockchain.users u JOIN blockchain.wallets w ON u.user_id = w.user_id GROUP BY u.user_id, u.username;"
},
{
"r... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE blockchain.addresses ( address_id character varying(128) NOT NULL, public_key text N... |
[
{
"role": "user",
"content": "List all assets that have 'category' metadata. Show the asset ID and the value of the 'category'."
},
{
"role": "assistant",
"content": "SELECT asset_id, value AS category FROM trading_platform.metadata WHERE key = 'category';"
},
{
"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 trading_platform.users (
user_id character varying(64) NOT NULL, -- unique iden... |
[
{
"role": "user",
"content": "Show the symbol and current balance for all ERC20 tokens held by wallet '0x...abc'."
},
{
"role": "assistant",
"content": "SELECT T2.symbol, T1.amount FROM erc20_balances AS T1 INNER JOIN token_metas AS T2 ON T1.contract_address = T2.contract_address WHERE T1.wallet... | You are an expert in writing database language. You can write a corresponding 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 tokens that have recorded smart money inflows. For these tokens, list the token symbol, the current price from the basic info table, and the total sum of USD values from all smart money inflows recorded for that token."
},
{
"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 token_basic_info ( coin_id.text, token_name.text, token_symbol.text, token_address.t... |
[
{
"role": "user",
"content": "Display the details of all UTXOs with a 'spent' status of false."
},
{
"role": "assistant",
"content": "SELECT utxo_id, transaction_id, output_index, address, amount FROM trading_platform.utxos WHERE spent = false;"
},
{
"role": "user",
"content": "For 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 trading_platform.users ( user_id text, username text, email text, password_hash text... |
[
{
"role": "user",
"content": "What are the latest prices for tokens with symbol 'USDT'?"
},
{
"role": "assistant",
"content": "SELECT * FROM token_prices_latest WHERE symbol = 'USDT';"
},
{
"role": "user",
"content": "Now show me the historical prices for 'USDT' from the last 7 days.... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... |
[
{
"role": "user",
"content": "Provide a list of node IDs, IP addresses, and the contract IDs and timestamps of smart contracts that were hypothetically created by these nodes."
},
{
"role": "assistant",
"content": "SELECT T1.node_id, T1.ip_address, T2.contract_id, T2.timestamp FROM blockchain.no... | You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique identifier... |
[
{
"role": "user",
"content": "Show me all contract addresses deployed by the address '0xabc...def'."
},
{
"role": "assistant",
"content": "SELECT address FROM web3.contracts WHERE deployer_address = '0xabc...def';"
},
{
"role": "user",
"content": "Can you refine that list to only inc... | You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, address text, abi text, bytecode text... |
[
{
"role": "user",
"content": "Show me the latest price and symbol for all tokens listed in the token_prices_latest table."
},
{
"role": "assistant",
"content": "SELECT symbol, price FROM token_prices_latest;"
},
{
"role": "user",
"content": "Filter that to only show tokens on the 'bi... | You are an expert in writing database language. You can write a corresponding 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": "For wallet '0x...', list the token IDs of the NFTs currently held, the name of their collection, and that collection's floor price."
},
{
"role": "assistant",
"content": "SELECT T1.token_id, T2.name, T2.floor_price FROM nft_holders AS T1 INNER JOIN nft_collections 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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... |
[
{
"role": "user",
"content": "List the number of users created each year, showing the year and the count, ordered by the year."
},
{
"role": "assistant",
"content": "SELECT EXTRACT(YEAR FROM created_at) AS creation_year, COUNT(*) FROM web3.users GROUP BY creation_year ORDER BY creation_year;"
... | You are an expert in writing database language. You can write a corresponding 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": "How many users are registered in the system?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM blockchain.users;"
},
{
"role": "user",
"content": "List the user ID and email for users whose email contains the string 'support'."
},
{
"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 blockchain.users ( user_id.text, username.text, email.text, password_hash.text )
|
[
{
"role": "user",
"content": "Show me a list of users who have logged any action. Include their user ID and username."
},
{
"role": "assistant",
"content": "SELECT DISTINCT u.user_id, u.username FROM users u JOIN logs l ON u.user_id = l.user_id;"
},
{
"role": "user",
"content": "For ... | You are an expert in writing database language. You can write a corresponding 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 me a list of all unique user IDs present in the wallet database."
},
{
"role": "assistant",
"content": "SELECT DISTINCT user_id FROM web3.wallets;"
},
{
"role": "user",
"content": "For each of those user IDs, how many wallets do they have? Show both... | You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, user_id character varying(6... |
[
{
"role": "user",
"content": "Find smart money addresses that have a positive ROI but their realized profit ratio is less than 50%. List their address, ROI, and realized ratio, ordered by ROI in descending order."
},
{
"role": "assistant",
"content": "SELECT address, roi, realized_ratio FROM sma... | You are an expert in writing database language. You can write a corresponding 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, rank INT, profit numer... |
[
{
"role": "user",
"content": "List all smart money token inflows, showing the token symbol, chain, and USD value."
},
{
"role": "assistant",
"content": "SELECT token_symbol, chain, usd_value FROM smart_money_token_inflow;"
},
{
"role": "user",
"content": "Filter that list to only sho... | You are an expert in writing database language. You can write a corresponding 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": "Provide a list of user ID, wallet ID, and details (contract ID, creator address, timestamp) for smart contracts created by addresses associated with wallets."
},
{
"role": "assistant",
"content": "SELECT w.user_id, w.wallet_id, sc.contract_id, sc.creator_address, sc... | You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id.text, previous_block_id.text, timestamp.timestamp, nonc... |
[
{
"role": "user",
"content": "Show me the balances held by the 'Coinbase' exchange. For each token, list the token symbol, balance, and the current price from the token basic info table."
},
{
"role": "assistant",
"content": "SELECT ctb.token_symbol, ctb.balance, tbi.price FROM cex_token_balance... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id.text, token_name.text, token_symbol.text, token_address.t... |
[
{
"role": "user",
"content": "List the token symbol, USD value, and narrative for all smart money token inflows."
},
{
"role": "assistant",
"content": "SELECT token_symbol, usd_value, narrative FROM smart_money_token_inflow;"
},
{
"role": "user",
"content": "Now, only show entries wh... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE smart_money_token_inflow ( token_address text, token_symbol text, token_amount numer... |
[
{
"role": "user",
"content": "Show me the wallet addresses holding the ERC20 token with contract address '0xabcdeffedcba9876543210abcdefedcba9876'. Include the amount they hold."
},
{
"role": "assistant",
"content": "SELECT wallet_address, amount FROM erc20_balances WHERE contract_address = '0xa... | You are an expert in writing database language. You can write a corresponding 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 the ticker and creator for all tokens recorded in the `token_info_avalanche` table."
},
{
"role": "assistant",
"content": "SELECT tick, creator FROM token_info_avalanche"
},
{
"role": "user",
"content": "Now, for these tokens, show their latest pric... | You are an expert in writing database language. You can write a corresponding 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_historical ( block_number.bigint, contract_address.text, wallet_addre... |
[
{
"role": "user",
"content": "Show me the details of tokens in the token_info_avalanche table that have the tick 'AVAX'."
},
{
"role": "assistant",
"content": "SELECT * FROM token_info_avalanche WHERE tick = 'AVAX';"
},
{
"role": "user",
"content": "Okay, now refine that. Just show m... | You are an expert in writing database language. You can write a corresponding 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": "How many smart contracts were created in the year 2023?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM blockchain.smart_contracts WHERE timestamp >= '2023-01-01' AND timestamp < '2024-01-01';"
},
{
"role": "user",
"content": "List the top 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 blockchain.smart_contracts ( contract_id.text, creator_address.text, code.text, time... |
[
{
"role": "user",
"content": "Show me the total market cap and the total smart money inflow USD value for each narrative. Join the `token_basic_info` and `smart_money_token_inflow` tables based on narrative."
},
{
"role": "assistant",
"content": "WITH Narratives AS ( SELECT DISTINCT narrative FR... | You are an expert in writing database language. You can write a corresponding 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": "Find tokens that appear in both the smart money token performance and the smart money token inflow tables. List the token symbol, chain, the PNL from the performance table, and the total USD value from all corresponding inflow records."
},
{
"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 token_basic_info ( coin_id.text, token_name.text, token_symbol.text, token_address.t... |
[
{
"role": "user",
"content": "Show me the average market cap and average 24-hour price change percentage for tokens on each chain."
},
{
"role": "assistant",
"content": "SELECT chain, AVG(market_cap) AS average_market_cap, AVG(price_change_percentage_24h) AS average_price_change_24h FROM token_b... | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var... |
[
{
"role": "user",
"content": "Show me the latest token activities on Avalanche, listing the type, amount, and timestamp."
},
{
"role": "assistant",
"content": "SELECT type, amt, block_timestamp FROM token_activities_avalanche ORDER BY block_timestamp DESC LIMIT 100"
},
{
"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 varch... |
[
{
"role": "user",
"content": "Show me the user ID, wallet ID, address ID, and the transaction ID for transactions where the sender address is linked to an address associated with a wallet."
},
{
"role": "assistant",
"content": "SELECT DISTINCT w.user_id, w.wallet_id, w.address_id, t.transaction_... | You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id text PRIMARY KEY, previous_block_id text, timestamp tim... |
[
{
"role": "user",
"content": "Provide the total count of addresses and the minimum balance recorded in the system."
},
{
"role": "assistant",
"content": "SELECT COUNT(*), MIN(balance) FROM blockchain.addresses;"
},
{
"role": "user",
"content": "Now, show me the address ID and public ... | You are an expert in writing database language. You can write a corresponding 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.addresses ( address_id text, public_key text, balance numeric )
|
[
{
"role": "user",
"content": "Find the transaction IDs and timestamps for all transactions that resulted from an emitted event."
},
{
"role": "assistant",
"content": "SELECT t.transaction_id, t.timestamp FROM web3.transactions t JOIN web3.events e ON t.transaction_id = e.transaction_id;"
}
] | You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id text, address text, abi text, bytecode text, deployer_a... |
[
{
"role": "user",
"content": "What is the total count of blocks and the average difficulty?"
},
{
"role": "assistant",
"content": "SELECT COUNT(*), AVG(difficulty) FROM blockchain.blocks"
},
{
"role": "user",
"content": "Now, show me the total count and average difficulty only for bl... | You are an expert in writing database language. You can write a corresponding 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.blocks ( block_id text PRIMARY KEY, previous_block_id text, timestamp tim... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.