system stringlengths 315 8.44k | 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 web3.token_transfers (
transfer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "For each token, show the token_id and the total number of unique addresses that have ever received it.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_id, COUNT(DISTINCT to_address) AS unique_recipients\nFROM web3.token_transfers\nGROUP BY token... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,... | [
{
"role": "user",
"content": "特定の職種の従業員情報を取得したいです。従業員ID、名前、職種、雇用日を表示してください。",
"sql": null
},
{
"role": "assistant",
"content": "db.employees.find(\n { job_title: '<specific_job_title>' },\n { employee_id: 1, first_name: 1, last_name: 1, job_title: 1, hire_date: 1, _id: 0 }\n).sort({ hi... |
You are an expert in writing database language. You can write a corresponding 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": "List all SUI coins with 'active' status, showing their owner address and balance.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT owner, balance FROM sui_coins WHERE status = 'active';",
"sql": null
},
{
"role": "user",
"content": "Add... |
You are an expert in writing database language. You can write a corresponding 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": "For each player, list their username and the total number of unique servers they have played on, only including players who have played on two or more different servers. Also show the titles of all games they've played sessions on.",
"sql": null
},
{
"role": "assist... |
You are an expert in writing database language. You can write a corresponding 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.documents ( document_id.text, application_id.text, citizen_id.te... | [
{
"role": "user",
"content": "For each document verified by an employee, list the document ID, the name of the verifying employee, and the name of the agency the employee belongs to.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.document_id, T2.first_name, T2.last_name, T3.ag... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.payments (
payment_id character varying(64) NOT NULL, --... | [
{
"role": "user",
"content": "List all reservations that have made multiple payment transactions. Return reservation_id and payment_id for each occurrence.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT p1.reservation_id, p1.payment_id\nFROM hospitality_technology.paymen... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, contract_id text, event_name text, data tex... | [
{
"role": "user",
"content": "List all token transfers with values greater than 1000, including the token ID and transaction ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transfer_id, token_id, transaction_id, value FROM web3.token_transfers WHERE value > 1000;",
"sql": ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.trades ( trade_id character varying(64) NOT NULL, account_id char... | [
{
"role": "user",
"content": "List each account number and the total quantity of shares traded through it.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T2.account_number, SUM(T1.quantity) FROM financial_services.trades AS T1 JOIN financial_services.accounts AS T2 ON T1.account_... |
You are an expert in writing database language. You can write a corresponding 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": "Show me the full names and specialties of all doctors who have issued a prescription for a patient enrolled in an insurance plan provided by 'Global Health'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT d.first_name, d.last_name, d.special... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients (
client_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Show all law firms with more than one partner assigned. Display the law firm name and the number of partners.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT lf.firm_name, COUNT(l.lawyer_id) AS partner_count\nFROM legal_services.law_firms lf\nJOIN leg... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients (
patient_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "Can you show me the full name, date of birth, and policy number for all patients who have insurance policies that will expire in the next 60 days, including the insurance plan ID?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.first_name, p.last_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 government_services.citizens ( citizen_id.text, national_id_number.text, first_name.... | [
{
"role": "user",
"content": "Count the total number of employees who have a direct manager assigned.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(employee_id) FROM government_services.employees WHERE manager_employee_id IS NOT NULL;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.conversations ( conversation_id text PRIMARY KEY, created_at timestamp,... | [
{
"role": "user",
"content": "How many unread notifications are there with the type 'mention'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM social_media.notifications WHERE read_at IS NULL AND notification_type = 'mention';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern... | [
{
"role": "user",
"content": "For each player, show their username and the total number of unique in-game items they have in their inventory.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.username, COUNT(DISTINCT pi.item_id) AS unique_items\nFROM gaming_technology.players p\nJ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.post_hashtags ( post_hashtag_id character varying(64) NOT NULL, post_id... | [
{
"role": "user",
"content": "List all unique hashtag IDs present in the system.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT hashtag_id FROM social_media.post_hashtags;",
"sql": null
},
{
"role": "user",
"content": "And how many users have chosen 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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir... | [
{
"role": "user",
"content": "Show the first name, last name of customers and the policy number for policies sold by agents licensed in 'TX'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T2.policy_number FROM insurance.customers AS T1 JOIN insurance... |
You are an expert in writing database language. You can write a corresponding 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 the name and symbol for all assets that do not have a corresponding entry with the key 'website' in the metadata table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.name , T1.symbol FROM trading_platform.assets AS T1 LEFT JOIN trading_platf... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, contract_id text, event_name text, data tex... | [
{
"role": "user",
"content": "Find all events where the data field contains 'amount' and show the event name, contract ID, and transaction ID, along with the log index, sorted by log index in ascending order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT event_name, contract_id,... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.locations ( location_id.text, name.text, type.text, address_line1.tex... | [
{
"role": "user",
"content": "List booking ID, booking time, and the name of the origin location for all bookings made from 'Airport' locations.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT b.booking_id, b.booking_time, ol.name AS origin_location_name FROM transportation.bookin... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_dexpool_info ( pair_address character varying(512) NOT NULL, -- the id of dexp... | [
{
"role": "user",
"content": "For each chain, find the token with the highest 24h trading volume and the token with the lowest 24h trading volume. Show chain, high_volume_token, high_volume_24h, low_volume_token, and low_volume_24h.",
"sql": null
},
{
"role": "assistant",
"content": "WITH ma... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List the first name, last name, and job title for all employees, along with the name of the agency they belong to.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T1.job_title, T2.agency_name FROM employees AS T1 JOIN agen... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREA... | [
{
"role": "user",
"content": "What are the training programs or certifications completed by a staff member with the role of Platform Supervisor?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to information about the training programs or certifications... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_dexpool_info ( pair_address character varying(512) NOT NULL, token_name charac... | [
{
"role": "user",
"content": "Show me the top 5 tokens by 24-hour trading volume on the Ethereum chain, along with their price and 24-hour price change percentage.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_name, token_symbol, price, price_change_percentage_24h, volume_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.locations ( location_id text PRIMARY KEY, name text, type text, addre... | [
{
"role": "user",
"content": "List the name and location ID for all locations where the postal code is missing.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, location_id FROM transportation.locations WHERE postal_code IS NULL;",
"sql": null
},
{
"role": "user",... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "List all pairs of patients who have the same emergency contact name and phone number. Show the IDs and full names of both patients and the shared emergency contact details (name and phone).",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.patient_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 financial_services.transactions ( transaction_id text, account_id text, related_acco... | [
{
"role": "user",
"content": "I want to see for each security the ticker_symbol, security_name, and the highest single-day close_price from the market_data.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.ticker_symbol, s.security_name, MAX(m.close_price) AS highest_close_price\... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"role": "user",
"content": "Which route numbers connect locations with a distance less than 80 km and more than 5 words in their description? Include the route type in the results.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_number, type FROM transportation.routes WHER... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE blockchain.wallets ( wallet_id text, user_id text, address_id text, private_key text... | [
{
"role": "user",
"content": "Show me all wallet addresses along with their private keys for users who have more than 3 wallets.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w1.address_id, w1.private_key FROM blockchain.wallets w1 INNER JOIN (SELECT user_id FROM blockchain.wall... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.guests ( guest_id text PRIMARY KEY, first_name text, last_nam... | [
{
"role": "user",
"content": "List all future reservations (where check_in_date > current_date) including guest full name, room_id, property_id, and the number of days until check-in.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.reservation_id, r.property_id, r.room_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 social_media.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "List the usernames and emails of all users who have received notifications of type 'follow', along with the sender's user ID and the notification timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, u.email, n.sender_user_id, n.creat... |
You are an expert in writing database language. You can write a corresponding 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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT object_id, collection_type, owner FROM sui_nfts WHERE status = 'exists';",
"sql": null
},
{
"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 insurance.insurance_products ( product_id.text, product_name.text, product_type.text... | [
{
"role": "user",
"content": "What are the top 5 product types by average base premium, showing the product_type and average base_premium, ordered by average base_premium descending?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_type, AVG(base_premium) AS avg_premium FRO... |
You are an expert in writing database language. You can write a corresponding 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": "I want a report showing each server's name, the game title it hosts, the total number of game_sessions on that server, and the average score in those sessions.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.server_name, g.title AS game_title, 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 transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, ... | [
{
"role": "user",
"content": "Show me all maintenance logs for vehicles of make 'Toyota' performed after January 1, 2024. Include the log ID, vehicle ID, service date, and service type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ml.log_id, ml.vehicle_id, ml.service_date, ml.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 hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List all properties and the room types they offer, including the base rate for each room type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.property_name, T2.type_name, T2.base_rate FROM hospitality_technology.properties AS T1 JOIN hospitality_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 legal_services.documents ( document_id.text, case_id.text, document_name.text, docum... | [
{
"role": "user",
"content": "List document names, types, and upload timestamps for documents uploaded after '2024-01-01'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_name , document_type , upload_timestamp FROM legal_services.documents WHERE upload_timestamp > '2... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.appointments ( appointment_id character varying(64) NOT NULL, patient_id ... | [
{
"role": "user",
"content": "List all appointments with status 'Completed' and location 'LOC001' that occurred in December 2023. Show appointment ID, time, duration, and notes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, appointment_time, duration_minutes, not... |
You are an expert in writing database language. You can write a corresponding 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 varchar, wallet_address varch... | [
{
"role": "user",
"content": "List all active SUI coins showing coin_type, balance, and owner from sui_coins.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT coin_type, balance, owner\nFROM sui_coins\nWHERE status = 'exists';",
"sql": null
},
{
"role": "user",
"con... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "Show me the total number of players who have unlocked at least one achievement on each server, along with the server name and game title.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.server_id, s.server_name, s.game_id, COUNT(DISTINCT pa.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 blockchain.nodes ( node_id character varying(64) NOT NULL, ip_address character vary... | [
{
"role": "user",
"content": "Retrieve all pairs of nodes where one node was last seen before '2023-06-01' and the other after '2023-06-01', and they share the same IP address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.node_id AS node_before,\n b.node_id AS node_afte... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "List all guests who have made a reservation for a room type with a base rate over 300, showing their first name, last name, the property name, and the room type name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T4.prop... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.assets ( asset_id text PRIMARY KEY, name text, symbol text, type te... | [
{
"role": "user",
"content": "List all assets that have at least one associated metadata entry, showing the asset name, symbol, and the key and value of each metadata entry.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.name, a.symbol, m.key, m.value FROM trading_platform.asse... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms ( room_id text, property_id text, room_number text, roo... | [
{
"role": "user",
"content": "Show me the count of rooms by status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status,\n COUNT(*) AS room_count\nFROM hospitality_technology.rooms\nGROUP BY status;",
"sql": null
},
{
"role": "user",
"content": "Actually, ... |
You are an expert in writing database language. You can write a corresponding 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": "Count how many assets have metadata entries for each metadata key, and list the metadata key and asset_count ordered by asset_count descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT key,\n COUNT(DISTINCT asset_id) AS asset_count\nFROM ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,... | [
{
"role": "user",
"content": "I need a list of pairs of vehicles that share the same type but have different fuel_types, showing both vehicle IDs and their fuel types.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v1.vehicle_id,\n v1.fuel_type,\n v2.vehicle_id AS oth... |
You are an expert in writing database language. You can write a corresponding 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 the wallet address, user ID, and the contract address of any contract where that wallet is listed as the deployer.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w.address AS wallet_address, w.user_id, c.address AS contract_address\nFROM web3.wa... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "Provide a list of properties and the total number of reservations made at each property.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name, COUNT(r.reservation_id) AS total_reservations FROM hospitality_technology.properties p JOIN hospi... |
You are an expert in writing database language. You can write a corresponding 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": "Find all pairs of token transfers where one transfer's sender and recipient are swapped with another transfer's sender and recipient, showing both transfer IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.from_address AS sender,\n t1.to_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 insurance.insurance_products ( product_id text, product_name text, product_type text... | [
{
"role": "user",
"content": "Find the total count of insurance products for each product type, but only include product types with more than 10 products.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_type, COUNT(*) FROM insurance.insurance_products GROUP BY product_type... |
You are an expert in writing database language. You can write a corresponding 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": "Find the contract ID, address, and deployer address for all contracts that have not emitted any events.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.contract_id, c.address, c.deployer_address FROM web3.contracts AS c LEFT JOIN web3.events AS e ON... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.events ( event_id character varying(64) NOT NULL, contract_id character varying... | [
{
"role": "user",
"content": "List all pairs of transactions where the recipient of the first transaction became the sender in the second, showing the first transaction_id, the second transaction_id, the shared address, and the timestamps of both transactions.",
"sql": null
},
{
"role": "assista... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "List all items of type 'Armor' in the database, showing the item name, rarity, and their corresponding game_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT item_id, item_name, rarity, game_id\nFROM gaming_technology.in_game_items\nWHERE item_type ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id.text, first_name.text, last_name.text, specialty.text... | [
{
"role": "user",
"content": "List each doctor along with the number of other doctors at the same hospital. Display doctor_id, first_name, last_name, and colleague_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.doctor_id, d1.first_name, d1.last_name, COUNT(d2.doctor_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 gaming_technology.game_sessions ( session_id.uuid, player_id.uuid, game_id.uuid, ser... | [
{
"role": "user",
"content": "List the names of servers and their regions, and the names of achievements available in the games hosted on those servers.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.server_name, s.region, a.name AS achievement_name FROM gaming_technology.serve... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "List pairs of invoice_number for invoices that share the same due_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.due_date,\n a.invoice_number AS invoice1,\n b.invoice_number AS invoice2\nFROM legal_services.invoices a\nJOIN 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.clients ( client_id.text, first_name.text, last_name.text, company_na... | [
{
"role": "user",
"content": "List all documents along with the case number they are associated with, as well as the name and email of the lawyer who uploaded them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document_name, d.document_type, d.case_id, l.first_name || ' ' || ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str... | [
{
"role": "user",
"content": "我想获取某个组件的详细信息,包括组件名称、描述、重量以及成本。",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (c:Component)\nWHERE c.component_id = 'specific_component_id'\nRETURN c.component_name, c.description, c.weight_kg, c.cost_usd",
"sql": null
},
{
"role": "user"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games (
game_id uuid NOT NULL DEFAULT gen_random_uuid(), -- un... | [
{
"role": "user",
"content": "For each publisher, find pairs of games they have published that belong to different genres. Include publisher_id, the genre and title of both games in each pair.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g1.publisher_id,\n g1.genre AS gen... |
You are an expert in writing database language. You can write a corresponding 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.documents ( document_id text, application_id text, citizen_id te... | [
{
"role": "user",
"content": "List all document IDs and document types for documents that have been verified by an employee, along with the verification timestamp and the ID of the verifying employee.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, document_type, veri... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id.text, route_number.text, description.text, origin_l... | [
{
"role": "user",
"content": "Retrieve the first_name, last_name, and email of all passengers who have never made a booking.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n p.first_name,\n p.last_name,\n p.email\nFROM transportation.passengers p\nLEFT JOIN transportation.book... |
You are an expert in writing database language. You can write a corresponding 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": "List all pairs of record_id for the same patient that were created on the same day. Show the two record_ids, patient_id, and the date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n mr1.patient_id,\n date_trunc('day', mr1.record_date) AS reco... |
You are an expert in writing database language. You can write a corresponding 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_performance ( token_address.text, token_symbol.text, pnl.numeric, ... | [
{
"role": "user",
"content": "List token symbols on any chain that have both a realized ratio above 0.8 and an ROI greater than 5. Show their symbol, chain, realized ratio, and ROI.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, chain, realized_ratio, roi FROM smart... |
You are an expert in writing database language. You can write a corresponding 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": "Can you show me the number of lawyers grouped by specialization?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT specialization, COUNT(*) AS lawyer_count FROM lawyers GROUP BY specialization;",
"sql": null
},
{
"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 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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.tick,\n i.creator,\n SUM(a.amt) AS total_volume\nFROM token_activities_avalanch... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name... | [
{
"role": "user",
"content": "Which agencies offer services with a standard fee greater than 100? List the agency name and the corresponding service names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.agency_name, T2.service_name FROM government_services.agencies AS T1 INNER... |
You are an expert in writing database language. You can write a corresponding 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": "Provide a count of players for each registered country.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT country_code, COUNT(*) FROM gaming_technology.players GROUP BY country_code;",
"sql": null
},
{
"role": "user",
"content": "Filter ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
"CREATE TABLE cex_token_balance (",
"snapshot_time character varying(32) NOT NULL, -- the ... | [
{
"role": "user",
"content": "List all CEX addresses on the BSC chain that hold more than $1 million USD value in total.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, SUM(usd_value) AS total_usd_value FROM cex_token_balance WHERE chain = 'BSC' GROUP BY address HAVING SU... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Find the names of service locations where services categorized as 'Licensing' have had appointments scheduled.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.location_name FROM service_locations AS T1 JOIN appointments AS T2 ON T1.locatio... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.prescriptions ( prescription_id text PRIMARY KEY, record_id text, patient... | [
{
"role": "user",
"content": "Show prescription ID, patient ID, and medication ID for prescriptions that have a start date before their end date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id, patient_id, medication_id FROM healthcare.prescriptions WHERE start_da... |
You are an expert in writing database language. You can write a corresponding 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 all customers who have two policies with overlapping coverage periods and show both policy numbers along with the overlap start and end dates.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.customer_id, p1.policy_number AS policy_number1, p2.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers (
customer_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "List all pairs of customers who live in the same zip_code. Show customer1_id, customer2_id, and zip_code.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n c1.customer_id AS customer1_id,\n c2.customer_id AS customer2_id,\n c1.zip_code\nFROM insura... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text PRIMARY KEY, first_name text, last_name text, sp... | [
{
"role": "user",
"content": "List all prescriptions, showing the prescription ID, the medication name, and the dosage.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.prescription_id, m.medication_name, p.dosage FROM healthcare.prescriptions AS p JOIN healthcare.medications 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 government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "Show the count of services available for each category.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT category, COUNT(service_id) AS service_count FROM government_services.services GROUP BY category;",
"sql": null
},
{
"role": "user",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.orders ( order_id text PRIMARY KEY, user_id text, wallet_id text, a... | [
{
"role": "user",
"content": "List all unique peer ports that have been used at least once in the system.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT port FROM trading_platform.peers ORDER BY port ASC;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ... | [
{
"role": "user",
"content": "List the patient ID, first name, last name, and phone number for all patients whose emergency contact name or phone number is missing.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, first_name, last_name, phone_number FROM healthcare.pati... |
You are an expert in writing database language. You can write a corresponding 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.agents ( agent_id text, first_name text, last_name text, agency_name text,... | [
{
"role": "user",
"content": "I need a list of agents along with their manager's contact email and phone number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id, a.first_name, a.last_name, m.contact_email AS manager_email, m.contact_phone AS manager_phone FROM insurance... |
You are an expert in writing database language. You can write a corresponding 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": "List all premium payments that have a status of 'pending'. Show the payment_id, policy_id, customer_id, and amount_paid.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_id, policy_id, customer_id, amount_paid FROM insurance.premium_payments 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 healthcare.prescriptions ( prescription_id text PRIMARY KEY, record_id text, patient... | [
{
"role": "user",
"content": "Find pairs of prescriptions issued to the same patient but for different medications, issued on the same date. Show the patient ID, the prescription IDs of the two prescriptions, and their medication IDs and prescription dates.",
"sql": null
},
{
"role": "assistant"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact... | [
{
"role": "user",
"content": "Show all claim documents (document_id, file_name, and document_type) for claims that have a settlement amount greater than 5000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cd.document_id, cd.file_name, cd.document_type\nFROM insurance.claim_docum... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, first_name text, last_name text,... | [
{
"role": "user",
"content": "Count the number of claim documents for each distinct MIME type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT mime_type, COUNT(*) FROM insurance.claim_documents GROUP BY mime_type",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.customers ( customer_id text, first_name text, last_name text, da... | [
{
"role": "user",
"content": "Show all transactions over 10,000 USD that are not marked as 'REVERSED'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_id, account_id, amount, currency, status, transaction_date\nFROM financial_services.transactions\nWHERE amount > 10000... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.messages ( message_id.text, conversation_id.text, sender_user_id.text, ... | [
{
"role": "user",
"content": "How many unread messages does each sender have? Show sender_user_id and count of messages where read_at is null.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sender_user_id, COUNT(*) AS unread_messages\nFROM social_media.messages\nWHERE read_at IS ... |
You are an expert in writing database language. You can write a corresponding 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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id, wallet_address, CAST(amoun... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte... | [
{
"role": "user",
"content": "How many hashtags were created in each month of 2024?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT date_trunc('month', created_at) AS month, COUNT(*) AS count\nFROM social_media.hashtags\nWHERE created_at >= '2024-01-01'\n AND created_at < '2025-0... |
You are an expert in writing database language. You can write a corresponding 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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT symbol, name, decimals FROM token_metas WHERE decimals > 8;",
"sql": null
},
{
"role": "user",
"conten... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.locations ( location_id text, name text, type text, address_line1 tex... | [
{
"role": "user",
"content": "Show me the log timestamp, fuel type, quantity, and the name of the location for all fuel logs recorded at locations with type 'Warehouse'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f.log_timestamp, f.fuel_type, f.quantity, l.name FROM transport... |
You are an expert in writing database language. You can write a corresponding 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.documents (
document_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "Count the number of documents for each unique document type.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_type, COUNT(*) AS document_count FROM government_services.documents GROUP BY document_type ORDER BY document_count DESC;",
"sql":... |
You are an expert in writing database language. You can write a corresponding 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.",
"sql": null
},
{
"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.userna... |
You are an expert in writing database language. You can write a corresponding 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.text, rank.numeric, profit.numeric, roi.numeric, realiz... | [
{
"role": "user",
"content": "List the top 3 addresses with the highest profit on the Arbitrum chain, including roi and most_profit_token.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, profit, roi, most_profit_token FROM smart_money_profit WHERE chain = 'Arbitrum' ORDER... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, roo... | [
{
"role": "user",
"content": "List service orders placed in the last 7 days, showing order_id, service_name, guest full name, and order_timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so.order_id, s.service_name, g.first_name || ' ' || g.last_name AS guest_name, so.orde... |
You are an expert in writing database language. You can write a corresponding 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": "Count the number of securities by exchange.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT exchange, COUNT(*) AS security_count\nFROM financial_services.securities\nGROUP BY exchange;",
"sql": null
},
{
"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 insurance.claims ( claim_id text PRIMARY KEY, policy_id text, customer_id text, inci... | [
{
"role": "user",
"content": "Which agents were hired in 2023 and have a commission rate over 0.07? Return their agent_id, full name, agency name, and hire date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agent_id, first_name, last_name, agency_name, hire_date\nFROM insurance... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name... | [
{
"role": "user",
"content": "How many appointments are recorded in the system?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM appointments;",
"sql": null
},
{
"role": "user",
"content": "Show the count of appointments for each status.",
"sql": 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.documents ( document_id character varying(64) NOT NULL, applicat... | [
{
"role": "user",
"content": "Show me all documents and the appointments scheduled by the same citizen. List the document ID, upload timestamp, document type, the corresponding appointment ID, and its scheduled start time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.documen... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "Show the content of comments and the content of the posts they belong to, for comments made by users whose location is 'New York'. Also include the username of the commenter.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.content AS comment_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 legal_services.law_firms (
firm_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Show me the name and founding date of every law firm.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT firm_name, founded_date\nFROM law_firms;",
"sql": null
},
{
"role": "user",
"content": "Also include the firm's phone number.",
"... |
You are an expert in writing database language. You can write a corresponding 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 case number and case name for all cases, along with the full name of the lawyer who uploaded any document related to those cases.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.case_number, c.case_name, l.first_name || ' ' || l.last_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 web3.contracts ( contract_id text PRIMARY KEY, address text, abi text, bytecode text... | [
{
"role": "user",
"content": "For each token transfer, show the transfer id, token symbol, and the username of the user who owns the sender address. Please order the result by transfer id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tt.transfer_id, tk.token_symbol, u.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 social_media.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "Show me the usernames and email addresses of users who have commented on their own posts, and the content of such comments.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, u.email, c.content AS comment_content\nFROM social_media.comments 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.users ( user_id text, username text, email text, password_hash text... | [
{
"role": "user",
"content": "Show me the top 5 users who have the highest total trade volume (quantity * price) as buyers, along with their email addresses and the number of distinct assets they traded.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.email, COUNT(DIS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.