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 government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "For each agency that is a parent, how many direct child agencies does it have? Show the parent agency name and the count.", "sql": null }, { "role": "assistant", "content": "SELECT parent.agency_name AS parent_agency_name, COUNT(child.agency_id) AS child_agency_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE financial_services.securities ( security_id character varying(64) NOT NULL, ticker_s...
[ { "role": "user", "content": "List all securities (security_id, ticker_symbol, issuer_name) where the currency is 'EUR' and the security_type is 'Equity', along with their exchange information.", "sql": null }, { "role": "assistant", "content": "SELECT security_id, ticker_symbol, issuer_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 CREATE TABLE transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "For each maintenance log, list the vehicle's license plate, the name of the mechanic, and the service date, ordered by most recent service first.", "sql": null }, { "role": "assistant", "content": "SELECT ml.log_id, v.license_plate, ml.mechanic_name, ml.service_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.in_game_items ( item_id uuid PRIMARY KEY, game_id uuid, item_name ...
[ { "role": "user", "content": "List each item_type along with the average cost_amount.", "sql": null }, { "role": "assistant", "content": "SELECT item_type, AVG(cost_amount) AS avg_cost\nFROM gaming_technology.in_game_items\nGROUP BY item_type;", "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.wallets ( wallet_id.text, user_id.text, address.text, private_key.t...
[ { "role": "user", "content": "Give me a count of log entries for each user.", "sql": null }, { "role": "assistant", "content": "SELECT user_id, COUNT(*) AS log_count\nFROM trading_platform.logs\nGROUP BY user_id;", "sql": null }, { "role": "user", "content": "Only show users ...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, from_address char...
[ { "role": "user", "content": "Provide a count of transactions grouped by their status.", "sql": null }, { "role": "assistant", "content": "SELECT status, COUNT(*) FROM web3.transactions GROUP BY status;", "sql": null }, { "role": "user", "content": "Now, only show the statuse...
You are an expert in writing database language. You can write a corresponding 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 the first and last names, email, and phone number for all patients who were added to the system in the last 90 days along with their emergency contact name.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, email, phone_numbe...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.service_locations ( location_id character varying(64) NOT NU...
[ { "role": "user", "content": "List all states where we have more than two service locations, and display the number of locations per state.", "sql": null }, { "role": "assistant", "content": "SELECT state, COUNT(*) AS location_count FROM government_services.service_locations GROUP BY state H...
You are an expert in writing database language. You can write a corresponding 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": "Find currently employed employees whose direct manager has been terminated. Display the employee's full name, hire date, manager's full name, and manager's termination date.", "sql": null }, { "role": "assistant", "content": "SELECT e.employee_id,\n CONCAT...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco...
[ { "role": "user", "content": "Which fundraising projects in 2023 have an associated token, and what are their investment amounts, chain, and token narratives?", "sql": null }, { "role": "assistant", "content": "SELECT p.project_name, p.investment_value, t.chain, t.narrative\nFROM project_fun...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure Index 'suppliers'. Mapping: { properties: { supplier_id: { type: 'keyword' }, supplier_name: { ty...
[ { "role": "user", "content": "특정 국가의 모든 공급업체 정보를 조회하고 싶습니다. 국가 이름, 공급업체 이름, 주소, 품질 등급을 포함해 주세요.", "sql": null }, { "role": "assistant", "content": "GET suppliers/_search\n{\n \"query\": {\n \"term\": {\n \"country\": \"Korea\"\n }\n },\n \"_source\": [\"supplier_name\", \"addre...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "How many trips used more than 500 units of fuel, and what are their trip IDs and scheduled departure times?", "sql": null }, { "role": "assistant", "content": "SELECT t.trip_id, t.scheduled_departure, SUM(f.quantity) AS total_fuel\nFROM transportation.trips t\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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "List all customers who reside in New York and were created in the system before 2023.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, first_name, last_name, created_at FROM insurance.customers WHERE state = 'NY' AND created_at < '2023-01-...
You are an expert in writing database language. You can write a corresponding 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": "Show all pairs of 'Evidence' documents within the same case, listing their document names, version numbers, and the shared case_id.", "sql": null }, { "role": "assistant", "content": "SELECT d1.case_id,\n d1.document_name AS doc1_name,\n d1.version ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, -- unique identif...
[ { "role": "user", "content": "List all policies with a premium amount between 500 and 1500. Show the policy number, premium amount, and status.", "sql": null }, { "role": "assistant", "content": "SELECT policy_number , premium_amount , status FROM insurance.policies WHERE premium_amount BE...
You are an expert in writing database language. You can write a corresponding 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 the names of services and the total number of times each service has been ordered. Only include services that have been ordered at least once.", "sql": null }, { "role": "assistant", "content": "SELECT T1.service_name, count(T2.order_id) AS order_count 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 legal_services.law_firms ( firm_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show the number of law firms founded each year, with the founding year and the count of firms, ordered by year in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT EXTRACT(YEAR FROM founded_date) AS founding_year, COUNT(*) AS firm_coun...
You are an expert in writing database language. You can write a corresponding 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": "Find all patients who have both primary and non-primary insurance plans from the same provider, showing their patient IDs and provider details.", "sql": null }, { "role": "assistant", "content": "SELECT pi1.patient_id, pi1.plan_id, pi1.policy_number, pi1.is_prim...
You are an expert in writing database language. You can write a corresponding 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": "Show all active staff members' full names and their positions.", "sql": null }, { "role": "assistant", "content": "SELECT staff_id, first_name || ' ' || last_name AS staff_full_name, position\nFROM hospitality_technology.staff\nWHERE is_active = true;", "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 insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,...
[ { "role": "user", "content": "For each state, count the number of customers and display state as state and the count as customer_count, ordered by customer_count descending.", "sql": null }, { "role": "assistant", "content": "SELECT state,\n COUNT(*) AS customer_count\nFROM insurance.c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "Calculate the total amount billed for each client, showing their first name, last name, and the total amount.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name, c.last_name, SUM(i.total_amount) FROM legal_services.clients c JOIN legal_servi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "List all medical record entries where the treatment_plan mentions a medication name. Return patient_id, record_id, and the matching medication_name.", "sql": null }, { "role": "assistant", "content": "SELECT mr.patient_id,\n mr.record_id,\n m.medicat...
You are an expert in writing database language. You can write a corresponding 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": "Find all patients and doctors who share the exact same phone number. List the patient ID, patient full name, doctor ID, doctor full name, and the shared phone number.", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id, p.first_name AS patien...
You are an expert in writing database language. You can write a corresponding 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.player_achievements ( player_achievement_id uuid, player_id uuid, ...
[ { "role": "user", "content": "List all pairs of achievements unlocked by the same player, showing player_id, achievement1, and achievement2.", "sql": null }, { "role": "assistant", "content": "SELECT pa1.player_id,\n pa1.achievement_id AS achievement1,\n pa2.achievement_id AS ach...
You are an expert in writing database language. You can write a corresponding 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 invoice number and total amount for invoices, along with the case number and case name for the related case.", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_number, i.total_amount, c.case_number, c.case_name\nFROM legal_services....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE smart_money_profit ( address character varying(100) NOT NULL, -- the user's address ...
[ { "role": "user", "content": "Show the top 3 addresses by ROI on the Polygon chain, including profit and the most profitable token.", "sql": null }, { "role": "assistant", "content": "SELECT address, roi, profit, most_profit_token FROM smart_money_profit WHERE chain = 'Polygon' ORDER BY roi ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "Show me the total amount held and number of unique wallets for each ERC20 token with a symbol ending in 'X'.", "sql": null }, { "role": "assistant", "content": "SELECT tm.symbol, SUM(CAST(ebh.amount AS DECIMAL)) AS total_amount, COUNT(DISTINCT ebh.wallet_address...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show the total hours spent by each lawyer across all their time entries. Display the lawyer's first name, last name, and the total hours.", "sql": null }, { "role": "assistant", "content": "SELECT l.first_name, l.last_name, SUM(te.hours_spent) AS total_hours 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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ...
[ { "role": "user", "content": "List the total number of notifications each user has received along with their user_id, username, and email.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id, u.username, u.email, COUNT(n.notification_id) AS total_notifications\nFROM trading_...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.likes ( like_id text PRIMARY KEY, user_id text, post_id text, comment_i...
[ { "role": "user", "content": "Find the total number of likes made on posts versus comments. Show two columns: like_type (either 'post' or 'comment') and like_count.", "sql": null }, { "role": "assistant", "content": "SELECT CASE WHEN post_id IS NOT NULL THEN 'post' ELSE 'comment' END AS like...
You are an expert in writing database language. You can write a corresponding 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": "Could you show me all scheduled appointments including appointment_id, scheduled_start_time, the citizen's full name, and the location name?", "sql": null }, { "role": "assistant", "content": "SELECT a.appointment_id,\n a.scheduled_start_time,\n c.fi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id.text, property_id.text, room_number.text, roo...
[ { "role": "user", "content": "How many available rooms and available services are there for each property?", "sql": null }, { "role": "assistant", "content": "SELECT\n r.property_id,\n SUM(CASE WHEN r.status = 'Available' THEN 1 ELSE 0 END) AS available_rooms_count,\n SUM(CASE WHEN s.is_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 gaming_technology.servers ( server_id uuid NOT NULL DEFAULT gen_random_uuid(), game_...
[ { "role": "user", "content": "Find pairs of servers in the same region where one server's last heartbeat was recorded within the last hour, and the other server's last heartbeat was recorded between 1 and 2 hours ago. Show the server names, regions, and last heartbeat timestamps for both servers in each pai...
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, title text, developer_id uuid, p...
[ { "role": "user", "content": "List game titles and their developer names for games released in 2023 or later.", "sql": "SELECT T1.title , T2.name FROM gaming_technology.games AS T1 JOIN gaming_technology.developers AS T2 ON T1.developer_id = T2.developer_id WHERE T1.release_date >= '2023-01-01'" }, ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE erc20_balances ( block_number.bigint, contract_address.text, wallet_address.text, am...
[ { "role": "user", "content": "Find all wallets that hold at least one NFT and also hold ERC-20 tokens.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT nh.wallet_address\nFROM nft_holders nh\nJOIN erc20_balances eb\n ON nh.wallet_address = eb.wallet_address;", "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 insurance.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex...
[ { "role": "user", "content": "Can you show me all policy numbers along with their product names for policies that have a deductible higher than 2000, and where the associated product is currently active?", "sql": null }, { "role": "assistant", "content": "SELECT p.policy_number, ip.product_n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.game_sessions ( session_id uuid PRIMARY KEY, player_id uuid, game_...
[ { "role": "user", "content": "For each server, what is the earliest and latest start time of its sessions?", "sql": null }, { "role": "assistant", "content": "SELECT server_id, MIN(start_time), MAX(start_time) FROM gaming_technology.game_sessions GROUP BY server_id;", "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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transacti...
[ { "role": "user", "content": "For each ERC1155 NFT on Ethereum, can you show the contract address, token ID, and the total number of unique wallet holders?", "sql": null }, { "role": "assistant", "content": "SELECT nh.contract_address, nh.token_id, COUNT(DISTINCT nh.wallet_address) AS unique...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.tokens ( token_id character varying(64) NOT NULL, contract_address character va...
[ { "role": "user", "content": "List all pairs of tokens (show token_id for both) that share the same contract address, excluding pairs where the token_id is the same.", "sql": null }, { "role": "assistant", "content": "SELECT t1.token_id AS token_id1, t2.token_id AS token_id2, t1.contract_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 transportation.trips ( trip_id character varying(64) NOT NULL, route_id character va...
[ { "role": "user", "content": "List all maintenance logs for vehicles that had 'Oil Change' service in the last 3 months, showing vehicle ID, service date, and cost.", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, service_date, cost FROM transportation.maintenance_logs ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id...
[ { "role": "user", "content": "List each patient and the total number of chronic diagnoses they have received, as well as the number of distinct doctors who have made those diagnoses.", "sql": null }, { "role": "assistant", "content": "SELECT patient_id, COUNT(*) AS chronic_diagnoses_count, C...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.clients ( client_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show me all appointments along with the subject, the appointment's start time, and the full name of the client associated with each appointment.", "sql": null }, { "role": "assistant", "content": "SELECT a.subject, a.start_time, c.first_name, c.last_name FROM le...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id.text, first_name.text, last_name.text, date_of_birt...
[ { "role": "user", "content": "List all insurance policies that are set as secondary (is_primary = false) and expired before today, showing the policy number, expiration date, patient ID, and the corresponding plan name.", "sql": null }, { "role": "assistant", "content": "SELECT pi.policy_num...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.players ( player_id uuid, username text, email text, password_hash...
[ { "role": "user", "content": "Show all achievements for games developed in Germany, including achievement names and their point values.", "sql": null }, { "role": "assistant", "content": "SELECT a.name AS achievement_name, a.points\nFROM gaming_technology.achievements a\nJOIN gaming_technolo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.drivers ( driver_id text PRIMARY KEY, employee_id text, first_name te...
[ { "role": "user", "content": "Show me driver first_name, last_name, route_number and origin city for all trips scheduled to depart between current_date and current_date + interval '7 days'.", "sql": null }, { "role": "assistant", "content": "SELECT d.first_name,\n d.last_name,\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 trading_platform.assets ( asset_id character varying(64) NOT NULL, name character va...
[ { "role": "user", "content": "List all asset types in the platform along with the count of assets for each type.", "sql": null }, { "role": "assistant", "content": "SELECT type, COUNT(*) as asset_count FROM trading_platform.assets GROUP BY type;", "sql": null }, { "role": "user",...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.notifications ( notification_id.text, citizen_id.text, applicati...
[ { "role": "user", "content": "Find the application IDs for applications that have received notifications through both 'Email' and 'SMS' channels.", "sql": null }, { "role": "assistant", "content": "SELECT application_id FROM government_services.notifications WHERE channel IN ('Email', 'SMS')...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.claim_documents ( document_id text PRIMARY KEY, claim_id text, document_ty...
[ { "role": "user", "content": "Find claim IDs that have more than 5 documents of type 'PHOTO'.", "sql": null }, { "role": "assistant", "content": "SELECT claim_id FROM insurance.claim_documents WHERE document_type = 'PHOTO' GROUP BY claim_id HAVING COUNT(*) > 5;", "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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "Show me all ERC1155 NFT contracts and the total number of wallet addresses that currently hold at least one NFT from each contract.", "sql": null }, { "role": "assistant", "content": "SELECT contract_address, COUNT(DISTINCT wallet_address) as holder_count FROM n...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.servers ( server_id uuid, game_id uuid, server_name text, region t...
[ { "role": "user", "content": "Show the maximum and minimum current_players for each server status.", "sql": null }, { "role": "assistant", "content": "SELECT status, MAX(current_players) AS max_current_players, MIN(current_players) AS min_current_players FROM gaming_technology.servers GROUP ...
You are an expert in writing database language. You can write a corresponding 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 each user, show the date of their earliest and latest wallet creation.", "sql": null }, { "role": "assistant", "content": "SELECT user_id,\n MIN(created_at) AS first_created,\n MAX(created_at) AS last_created\nFROM web3.wallets\nGROUP BY user_id;...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id text PRIMARY KEY, property_id text, room_numb...
[ { "role": "user", "content": "Retrieve review comments and their overall rating for properties that currently have at least one room with a status of 'Available'. Include the review ID, property ID, and review date.", "sql": null }, { "role": "assistant", "content": "SELECT r.review_id, r.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 hospitality_technology.room_types ( room_type_id text, property_id text, type_name t...
[ { "role": "user", "content": "List all room types that have a King bed and include their maximum occupancy and amenities.", "sql": null }, { "role": "assistant", "content": "SELECT type_name, max_occupancy, amenities FROM hospitality_technology.room_types WHERE bed_type = 'King';", "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 healthcare.insurance_plans ( plan_id text PRIMARY KEY, plan_name text, insurance_pro...
[ { "role": "user", "content": "Provide the insurance_provider along with pairs of plan IDs and plan names for providers that offer multiple plans. Join the table to itself to find providers with at least two plans.", "sql": null }, { "role": "assistant", "content": "SELECT p1.insurance_provid...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.transactions ( transaction_id.text, from_address.text, to_address.text, value.n...
[ { "role": "user", "content": "For each sender address that has sent at least 10 transactions, show the address and the total gas used by their transactions.", "sql": null }, { "role": "assistant", "content": "SELECT from_address, SUM(gas_used) AS total_gas_used\nFROM web3.transactions\nGROUP...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.locations ( location_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "I need a report showing the number of maintenance services performed per vehicle, broken down by service_type.", "sql": null }, { "role": "assistant", "content": "SELECT\n vehicle_id,\n service_type,\n COUNT(*) AS service_count\nFROM\n transportation...
You are an expert in writing database language. You can write a corresponding 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": "Find all wallets that were created by users with IDs starting with 'user_' and show their addresses along with creation timestamps.", "sql": null }, { "role": "assistant", "content": "SELECT address, created_at FROM web3.wallets WHERE user_id LIKE '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 transportation.vehicles ( vehicle_id text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "For each route that originates from a location of type 'Port', list the route number, the name of the origin location, and the total distance accumulated from all completed trips on this route.", "sql": null }, { "role": "assistant", "content": "SELECT\n r.rout...
You are an expert in writing database language. You can write a corresponding 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": "Find all beneficiaries added in the last 7 days, include beneficiary_id, policy_id, and percentage_share, sorted by percentage_share descending.", "sql": null }, { "role": "assistant", "content": "SELECT beneficiary_id, policy_id, percentage_share\nFROM insuranc...
You are an expert in writing database language. You can write a corresponding 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 rooms, including their room number, the name of the property they belong to, and their room type name, specifically for rooms with 'Maintenance' status.", "sql": null }, { "role": "assistant", "content": "SELECT T1.room_number, T2.property_name, T3.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 gaming_technology.players ( player_id.uuid, username.text, email.text, password_hash...
[ { "role": "user", "content": "For each game, show the game ID, title, and the total number of players who have unlocked at least one achievement in that game.", "sql": null }, { "role": "assistant", "content": "SELECT g.game_id, g.title, COUNT(DISTINCT pa.player_id) AS total_players\nFROM ga...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.users ( user_id text, username text, email text, password_hash text, created_at...
[ { "role": "user", "content": "List all pairs of users who registered within one day of each other, including their user IDs, usernames, and the difference in registration time.", "sql": null }, { "role": "assistant", "content": "SELECT u1.user_id AS user_id_1, u1.username AS username_1, u2.u...
You are an expert in writing database language. You can write a corresponding 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": "For each vehicle, show vehicle_id, make, model, the earliest and latest fuel log IDs with their timestamps.", "sql": null }, { "role": "assistant", "content": "WITH extremes AS (\n SELECT vehicle_id,\n MIN(log_timestamp) AS first_ts,\n MAX(log_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.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "Find all clients and lawyers who share the same phone area code, and show each client's first and last name, each lawyer's first and last name, and the shared area code.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name AS client_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 CREATE TABLE legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "Show me each law firm's ID, name, managing_partner_id, and the number of appointments scheduled with that managing partner.", "sql": null }, { "role": "assistant", "content": "SELECT f.firm_id, \n f.firm_name, \n f.managing_partner_id, \n 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 social_media.post_hashtags ( post_hashtag_id character varying(64) NOT NULL, post_id...
[ { "role": "user", "content": "How many unique hashtags are linked to each post? Return post_id and hashtag_count.", "sql": null }, { "role": "assistant", "content": "SELECT post_id, COUNT(DISTINCT hashtag_id) AS hashtag_count\nFROM social_media.post_hashtags\nGROUP BY post_id;", "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 legal_services.cases ( case_id text, case_number text, case_name text, client_id tex...
[ { "role": "user", "content": "List the appointment ID, start time, and the case number for all appointments that are linked to a case.", "sql": null }, { "role": "assistant", "content": "SELECT T1.appointment_id, T1.start_time, T2.case_number FROM legal_services.appointments AS T1 JOIN legal...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "List all appointments and all diagnoses made by the *same doctor*. Show the appointment ID, doctor ID, appointment time, and diagnosis ID.", "sql": null }, { "role": "assistant", "content": "SELECT a.appointment_id, a.doctor_id, a.appointment_time, d.diagnosis_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 web3.token_transfers ( transfer_id text PRIMARY KEY, token_id text, from_address tex...
[ { "role": "user", "content": "List all pairs of token transfers occurring within the same transaction where one transferred value is greater than the other, showing both transfer IDs, the transaction ID, and both values.", "sql": null }, { "role": "assistant", "content": "SELECT t1.transacti...
You are an expert in writing database language. You can write a corresponding 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 active prescriptions for medication 'ibuprofen' with dosage greater than 200mg, including patient ID and doctor details.", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id, d.first_name, d.last_name, d.specialty, m.medication_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 CREATE TABLE web3.tokens ( token_id character varying(64) NOT NULL, -- unique identifier for...
[ { "role": "user", "content": "Find all pairs of tokens that have the same token name but different contract addresses, showing both token IDs, the shared token name, and each contract address.", "sql": null }, { "role": "assistant", "content": "SELECT t1.token_id AS token_id_1, t2.token_id A...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "List all medical record IDs and the record date for records created by doctors specializing in 'Gastroenterology'.", "sql": null }, { "role": "assistant", "content": "SELECT mr.record_id, mr.record_date FROM healthcare.medical_records mr JOIN healthcare.doctors ...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "For each trip, provide the trip ID, the name of the vehicle's make and model, and the total quantity of fuel used during that trip.", "sql": null }, { "role": "assistant", "content": "SELECT t.trip_id, v.make, v.model, SUM(f.quantity) AS total_fuel_used\nFROM tr...
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "What are the top five most recently uploaded documents, including document_id, document_name, and upload_timestamp?", "sql": null }, { "role": "assistant", "content": "SELECT document_id, document_name, upload_timestamp\nFROM legal_services.documents\nORDER BY u...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.appointments ( appointment_id text, client_id text, lawyer_id text, c...
[ { "role": "user", "content": "List all appointments for the client with ID 'client_001' showing the lawyer's ID, appointment subject, and start time.", "sql": null }, { "role": "assistant", "content": "SELECT a.lawyer_id, a.subject, a.start_time\nFROM legal_services.appointments a\nWHERE a.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 hospitality_technology.room_types ( room_type_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "Show me all room types that accommodate exactly 2 guests, including type name and the associated property ID.", "sql": null }, { "role": "assistant", "content": "SELECT room_type_id, type_name, property_id\nFROM hospitality_technology.room_types\nWHERE max_occup...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE trading_platform.notifications ( notification_id.text, user_id.text, message.text, s...
[ { "role": "user", "content": "Could you provide the total number of notifications sent on each day?", "sql": null }, { "role": "assistant", "content": "SELECT DATE(sent_at), COUNT(*) FROM notifications GROUP BY DATE(sent_at) ORDER BY DATE(sent_at);", "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 trading_platform.wallets ( wallet_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "List each asset's name and symbol along with the total number of open orders for that asset.", "sql": null }, { "role": "assistant", "content": "SELECT a.name,\n a.symbol,\n COUNT(o.order_id) AS open_order_count\nFROM trading_platform.assets a\nLEFT ...
You are an expert in writing database language. You can write a corresponding 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": "For each patient, show their full name and the count of insurance plans they are enrolled in, as well as their earliest policy effective date.", "sql": null }, { "role": "assistant", "content": "SELECT p.first_name, p.last_name, COUNT(pi.plan_id) AS plan_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 hospitality_technology.properties ( property_id text, property_name text, address_li...
[ { "role": "user", "content": "For each property, list the names of all available services in the 'Wellness' category. Show property name and service name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.property_name, T2.service_name FROM hospitality_technology.properties AS T1...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.player_inventory ( inventory_id uuid NOT NULL DEFAULT gen_random_u...
[ { "role": "user", "content": "Show me, for each item, the total number of times it has been acquired and the earliest date it was acquired. Also, show the number of unique players who have acquired each item.", "sql": null }, { "role": "assistant", "content": "SELECT item_id, COUNT(*) AS tot...
You are an expert in writing database language. You can write a corresponding 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": "For each appointment, show the appointment ID, scheduled start time, and the category of the service associated with it.", "sql": null }, { "role": "assistant", "content": "SELECT a.appointment_id, a.scheduled_start_time, s.category\nFROM government_services.app...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "List all posts that contain the word 'festival' in their content, showing the post_id, the author's username, and the post creation time.", "sql": null }, { "role": "assistant", "content": "SELECT p.post_id, u.username, p.created_at\nFROM social_media.posts 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.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List all posts along with the number of comments each post has received.", "sql": null }, { "role": "assistant", "content": "SELECT p.post_id, COUNT(c.comment_id) AS comment_count\nFROM social_media.posts p\nLEFT JOIN social_media.comments c ON p.post_id = c.pos...
You are an expert in writing database language. You can write a corresponding 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": "List all pairs of contracts deployed on the same network on the same day, showing network_id, the date, and the two contract IDs.", "sql": null }, { "role": "assistant", "content": "SELECT c1.network_id,\n DATE(c1.deployed_at) AS deploy_date,\n c1.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 gaming_technology.developers ( developer_id uuid, name text, country text, founded_y...
[ { "role": "user", "content": "Which countries have the highest number of developer companies founded after 2005? Please show country, the number of developers, and order by developer count descending.", "sql": null }, { "role": "assistant", "content": "SELECT country, COUNT(*) AS developer_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 insurance.insurance_products ( product_id.text, product_name.text, product_type.text...
[ { "role": "user", "content": "Find pairs of products that share the same product_type but have different is_active statuses. Return the product_type, active product_id, active product_name, inactive product_id, and inactive product_name.", "sql": null }, { "role": "assistant", "content": "SE...
You are an expert in writing database language. You can write a corresponding 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, national_i...
[ { "role": "user", "content": "Retrieve each employee's first and last name along with the count of applications they've been assigned that are currently in the 'Under Review' status.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name,\n e.last_name,\n COUNT(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 hospitality_technology.reservations ( reservation_id text, property_id text, guest_i...
[ { "role": "user", "content": "For each guest, list reservation_id, guest_id, check_in_date, and the next reservation_id and its check_in_date.", "sql": null }, { "role": "assistant", "content": "SELECT r1.reservation_id,\n r1.guest_id,\n r1.check_in_date,\n r2.reservation_i...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE gaming_technology.achievements ( achievement_id uuid, game_id uuid, name text, descr...
[ { "role": "user", "content": "I need to list pairs of achievements within the same game, showing game_id, the name of the first achievement, and the name of the second achievement.", "sql": null }, { "role": "assistant", "content": "SELECT a1.game_id, a1.name AS achievement1, a2.name AS achi...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, -- un...
[ { "role": "user", "content": "For each application where the total payments exceed 100, show the application ID, the citizen's full name, the total payment amount, and the currency.", "sql": null }, { "role": "assistant", "content": "SELECT a.application_id,\n c.first_name || ' ' || 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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "Retrieve each guest's full name and the date of their most recent review, including review_source.", "sql": null }, { "role": "assistant", "content": "SELECT sub.guest_id, sub.full_name, sub.review_date AS last_review_date, sub.review_source\nFROM (\n SELECT g....
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_dexpool_info ( pair_address character varying(512) NOT NULL, -- the id of dexp...
[ { "role": "user", "content": "What is the total market cap for all tokens listed on the 'Polygon' chain?", "sql": null }, { "role": "assistant", "content": "SELECT SUM(market_cap) FROM token_dexpool_info WHERE chain = 'Polygon';", "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 hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text...
[ { "role": "user", "content": "Which staff members are managing properties, and what are the names and email addresses of those properties?", "sql": null }, { "role": "assistant", "content": "SELECT s.staff_id, s.first_name, s.last_name, p.property_name, p.email_address FROM hospitality_techn...
You are an expert in writing database language. You can write a corresponding 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": "List the names of services that have been scheduled at accessible service locations.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.service_name FROM government_services.services AS T1 JOIN government_services.appointments AS T2 ON T1.ser...
You are an expert in writing database language. You can write a corresponding 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.comments ( comment_id character varying(64) NOT NULL, -- unique ide...
[ { "role": "user", "content": "Count the number of comments that have been updated since they were first created.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.comments WHERE updated_at > created_at;", "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.game_sessions ( session_id uuid NOT NULL DEFAULT gen_random_uuid()...
[ { "role": "user", "content": "Show each player's total session count and the date of their earliest acquired inventory item.", "sql": null }, { "role": "assistant", "content": "SELECT gs.player_id,\n COUNT(gs.session_id) AS session_count,\n MIN(pi.acquired_at) AS first_item_date\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Show me all rooms with their room number, the type name, and the maximum occupancy for each room.", "sql": null }, { "role": "assistant", "content": "SELECT r.room_id, r.room_number, rt.type_name, rt.max_occupancy\nFROM hospitality_technology.rooms r\nJOIN 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 smart_money_profit ( address text, rank numeric, profit numeric, roi numeric, realiz...
[ { "role": "user", "content": "List addresses on the 'Ethereum' chain that have an ROI greater than 5 and a profit greater than $1000. Show their address, profit, ROI, and realized ratio.", "sql": null }, { "role": "assistant", "content": "SELECT address, profit, roi, realized_ratio FROM smar...
You are an expert in writing database language. You can write a corresponding 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": "For each token, show its token name, token symbol, the address of the contract it was created on, and the deployer address of that contract.", "sql": null }, { "role": "assistant", "content": "SELECT t.token_id, t.token_name, t.token_symbol, t.contract_address, ...