system
stringlengths
315
7.84k
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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "Give me a list of all passengers with an email address on file, showing their first name, last name, and the date their record was created." }, { "role": "assistant", "content": "SELECT first_name, last_name, created_at\nFROM transportation.passengers\nWHERE email 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 transportation.bookings ( booking_id.text, passenger_id.text, trip_id.text, seat_num...
[ { "role": "user", "content": "What are the average and maximum fare amounts for each booking status?" }, { "role": "assistant", "content": "SELECT status, AVG(fare) AS avg_fare, MAX(fare) AS max_fare\nFROM transportation.bookings\nGROUP BY status;" }, { "role": "user", "content": "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 transportation.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c...
[ { "role": "user", "content": "Can you show the fuel_log_id, vehicle make, and quantity for all fuel logs where the quantity is greater than 100?" }, { "role": "assistant", "content": "SELECT f.fuel_log_id, v.make, f.quantity\nFROM transportation.fuel_logs f\nJOIN transportation.vehicles v ON f.v...
You are an expert in writing database language. You can write a corresponding 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'." }, { "role": "assistant", "content": "SELECT f.log_timestamp, f.fuel_type, f.quantity, l.name FROM transportation.fuel_logs f...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE transportation.vehicles ( vehicle_id.text, license_plate.text, vin.text, make.text, ...
[ { "role": "user", "content": "For each vehicle, find the vehicle acquired immediately before it in the same depot. Show current vehicle_id, acquisition_date, previous_vehicle_id, and previous_acquisition_date." }, { "role": "assistant", "content": "SELECT v.vehicle_id,\n v.acquisition_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 transportation.routes ( route_id text PRIMARY KEY, route_number text, description te...
[ { "role": "user", "content": "Show the booking ID and seat number for all bookings that have a fare equal to 50." }, { "role": "assistant", "content": "SELECT booking_id, seat_number\nFROM transportation.bookings\nWHERE fare = 50;" }, { "role": "user", "content": "Also include the bo...
You are an expert in writing database language. You can write a corresponding 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": "Retrieve the daily total fare collected for bookings with status 'Completed' in March 2024. Display the booking_date and total_fare." }, { "role": "assistant", "content": "SELECT\n DATE(booking_time) AS booking_date,\n SUM(fare) AS total_fare\nFROM 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 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." }, { "role": "assistant", "content": "SELECT ml.log_id, ml.vehicle_id, ml.service_date, ml.service_type\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": "Could you provide the number of vehicles for each fuel_type?" }, { "role": "assistant", "content": "SELECT fuel_type, COUNT(*) AS vehicle_count\nFROM transportation.vehicles\nGROUP BY fuel_type;" }, { "role": "user", "content": "Filter out fuel types hav...
You are an expert in writing database language. You can write a corresponding 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": "List the number of bookings made by each passenger, including passenger_id, first_name, last_name, and booking_count." }, { "role": "assistant", "content": "SELECT p.passenger_id,\n p.first_name,\n p.last_name,\n COUNT(b.booking_id) AS booking_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 transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "Find pairs of distinct routes that share the same destination location but start from different origins. Include the route ID and route number for both routes and the shared destination location ID." }, { "role": "assistant", "content": "SELECT\n r1.route_id AS rou...
You are an expert in writing database language. You can write a corresponding 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.bookings ( booking_id text, passenger_id text, trip_id text, seat_num...
[ { "role": "user", "content": "List each booking with its previous booking time for the same passenger." }, { "role": "assistant", "content": "SELECT b.booking_id,\n b.passenger_id,\n b.booking_time,\n LAG(b.booking_time) OVER (PARTITION BY b.passenger_id ORDER BY b.booking_time...
You are an expert in writing database language. You can write a corresponding 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, what is the average time difference in days between their wallet creations? Return user_id and avg_diff_days." }, { "role": "assistant", "content": "WITH diffs AS (\n SELECT\n user_id,\n EXTRACT(EPOCH FROM (created_at - LAG(created_at) OVER (PA...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id text PRIMARY KEY, address text, abi text, bytecode text...
[ { "role": "user", "content": "List all failed transactions along with the from and to addresses, and the gas used." }, { "role": "assistant", "content": "SELECT transaction_id, from_address, to_address, gas_used FROM web3.transactions WHERE status = 'failed';" }, { "role": "user", "c...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.token_transfers ( transfer_id text, token_id text, from_address text, to_addres...
[ { "role": "user", "content": "For each transaction, show its transaction_id and the count of tokens transferred within that transaction." }, { "role": "assistant", "content": "SELECT transaction_id, COUNT(token_id) AS tokens_transferred FROM web3.token_transfers GROUP BY transaction_id;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.wallets ( wallet_id text PRIMARY KEY, user_id text, address text, private_key t...
[ { "role": "user", "content": "Find pairs of wallets that were created at the exact same timestamp but are owned by different users. List the IDs of both wallets and the shared creation timestamp." }, { "role": "assistant", "content": "SELECT\n w1.wallet_id AS wallet1_id,\n w2.wallet_id 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 web3.users ( user_id text, username text, email text, password_hash text, created_at...
[ { "role": "user", "content": "Find pairs of users who registered on the same weekday but in different years. List the user ID and registration date for both users, and the weekday name." }, { "role": "assistant", "content": "SELECT u1.user_id, u1.created_at AS user1_created_at, u2.user_id, u2.cr...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.users ( user_id character varying(64) NOT NULL, username character varying(128)...
[ { "role": "user", "content": "For each user, find the previous user by registration time. List current user_id and username, previous user_id and username, and the time difference in minutes between their registrations." }, { "role": "assistant", "content": "SELECT u.user_id AS current_user_id,\...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,...
[ { "role": "user", "content": "Calculate the total transfer volume and number of transfers for each Avalanche token tick over the past 7 days." }, { "role": "assistant", "content": "SELECT ta.tick,\n SUM(ta.amt) AS total_volume,\n COUNT(*) AS transfer_count\nFROM token_activities_av...
You are an expert in writing database language. You can write a corresponding 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 Avalanche tokens, show me the token `tick`, `creator`, and `max_supply` from the `token_info_avalanche` table." }, { "role": "assistant", "content": "SELECT tick, creator, max_supply FROM token_info_avalanche" }, { "role": "user", "content": "Now, fo...
You are an expert in writing database language. You can write a corresponding 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": "Compute the co-occurrence count for each hashtag pair across all posts." }, { "role": "assistant", "content": "SELECT ph1.hashtag_id AS tag_a, ph2.hashtag_id AS tag_b, COUNT(DISTINCT ph1.post_id) AS co_occurrence_count\nFROM social_media.post_hashtags ph1\nJOIN soci...
You are an expert in writing database language. You can write a corresponding 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": "List all group chats and the total count of messages sent in each one." }, { "role": "assistant", "content": "SELECT T1.group_name, count(T2.message_id) AS message_count FROM social_media.conversations AS T1 JOIN social_media.messages AS T2 ON T1.conversation_id = 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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "For each user, show their username and how many unique conversations they have sent at least one message in where the conversation is a group chat." }, { "role": "assistant", "content": "SELECT u.username, COUNT(DISTINCT m.conversation_id) AS group_chats_messaged_in...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "How many notifications have been sent by each sender? Show sender_user_id and notification count." }, { "role": "assistant", "content": "SELECT sender_user_id, COUNT(*) AS notification_count\nFROM social_media.notifications\nWHERE sender_user_id IS NOT NULL\nGROUP B...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE 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." }, { "role": "assistant", "content": "SELECT COUNT(*) FROM social_media.comments WHERE updated_at > created_at;" } ]
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character vary...
[ { "role": "user", "content": "I need the count of messages each user has sent per conversation, along with the conversation's group_name when it's a group chat." }, { "role": "assistant", "content": "SELECT m.sender_user_id,\n u.username,\n m.conversation_id,\n CASE WHEN c.is_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 social_media.posts ( post_id text PRIMARY KEY, user_id text, content text, media_url...
[ { "role": "user", "content": "Show me all conversations that have more than 10 messages, along with the group name and the usernames of their participants." }, { "role": "assistant", "content": "SELECT c.conversation_id, c.group_name, u.username\nFROM social_media.conversations c\nJOIN social_me...
You are an expert in writing database language. You can write a corresponding 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": "Show me the usernames and the group names for each user who has sent at least one message in a group chat." }, { "role": "assistant", "content": "SELECT DISTINCT u.username, c.group_name\nFROM social_media.users u\nJOIN social_media.conversation_participants cp ON 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 character varying(64) NOT NULL, client_...
[ { "role": "user", "content": "What is the count of appointments for each lawyer? Display the lawyer ID and the total count." }, { "role": "assistant", "content": "SELECT lawyer_id, COUNT(*) AS appointment_count FROM legal_services.appointments GROUP BY lawyer_id;" }, { "role": "user", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.law_firms ( firm_id text, firm_name text, address text, phone text, w...
[ { "role": "user", "content": "What is the total sum of amounts paid for all invoices?" }, { "role": "assistant", "content": "SELECT SUM(amount_paid) FROM invoices;" }, { "role": "user", "content": "Group this total by the status of the invoice." }, { "role": "assistant", ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.appointments ( appointment_id character varying(64) NOT NULL, client_...
[ { "role": "user", "content": "Show me the subject and start times of all appointments along with the corresponding lawyer IDs for each client." }, { "role": "assistant", "content": "SELECT client_id, lawyer_id, subject, start_time FROM legal_services.appointments;" } ]
You are an expert in writing database language. You can write a corresponding 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": "Get a list of appointment_id, start_time, and invoice_number for appointments that have a related invoice." }, { "role": "assistant", "content": "SELECT a.appointment_id,\n a.start_time,\n i.invoice_number\nFROM legal_services.appointments 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.time_entries ( entry_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Show me all time entries from the last 90 days, including the entry description, hours spent, the name of the case, and the name of the client." }, { "role": "assistant", "content": "SELECT T1.description, T1.hours_spent, T2.case_name, T3.first_name, T3.last_name FR...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.invoices ( invoice_id character varying(64) NOT NULL, -- unique ...
[ { "role": "user", "content": "I want to see a list of invoice_number and appointment_id for each invoice that has a scheduled appointment." }, { "role": "assistant", "content": "SELECT i.invoice_number,\n a.appointment_id\nFROM legal_services.invoices i\nJOIN legal_services.appointments 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 legal_services.documents ( document_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List the document name, type, version, and description for all documents." }, { "role": "assistant", "content": "SELECT document_name, document_type, version, description FROM documents;" }, { "role": "user", "content": "Only include documents where 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 legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "Show me a list of all appointments with the subject and full name of the assigned lawyer." }, { "role": "assistant", "content": "SELECT a.appointment_id, a.subject, l.first_name || ' ' || l.last_name AS lawyer_full_name\nFROM legal_services.appointments a\nJOIN lega...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "For every customer, show their first name, last name, and the policy number of any policies they own." }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.policy_number FROM insurance.customers AS T1 JOIN insurance.policies AS T2 ON T1.custo...
You are an expert in writing database language. You can write a corresponding 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, -- unique id...
[ { "role": "user", "content": "Find the top 5 transactions with the highest gas prices, including the from_address, to_address, and block_number, sorted by gas_price in descending order." }, { "role": "assistant", "content": "SELECT transaction_id, from_address, to_address, block_number, gas_pric...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE web3.contracts ( contract_id text, address text, abi text, bytecode text, deployer_a...
[ { "role": "user", "content": "List all contracts and the number of different tokens associated with each contract address. Show contract_id, contract address, and token_count." }, { "role": "assistant", "content": "SELECT c.contract_id, c.address, COUNT(DISTINCT t.token_id) AS token_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 insurance.agents ( agent_id character varying(64) NOT NULL, first_name character var...
[ { "role": "user", "content": "Which agents, along with their managers' full names, are licensed in 'TX' and are currently active?" }, { "role": "assistant", "content": "SELECT a.agent_id, a.first_name AS agent_first_name, a.last_name AS agent_last_name, m.first_name AS manager_first_name, m.last...
You are an expert in writing database language. You can write a corresponding 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 transfer volume and number of transfers for each token tick on Bitcoin in the past 7 days." }, { "role": "assistant", "content": "SELECT tick, SUM(amt) AS total_volume, COUNT(*) AS transfer_count\nFROM token_activities_bitcoin\nWHERE block_timestam...
You are an expert in writing database language. You can write a corresponding 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 the vehicle ID and the total number of fuel logs recorded for each vehicle." }, { "role": "assistant", "content": "SELECT vehicle_id , count(*) FROM transportation.fuel_logs GROUP BY vehicle_id" }, { "role": "user", "content": "Filter this list to o...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE legal_services.lawyers ( lawyer_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "List all partners who have provided a phone number, showing their full name and email." }, { "role": "assistant", "content": "SELECT first_name, last_name, email FROM legal_services.lawyers WHERE is_partner = TRUE AND phone IS NOT 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 hospitality_technology.staff ( staff_id character varying(64) NOT NULL, property_id ...
[ { "role": "user", "content": "Show me the email addresses and hire dates for all staff who have a manager." }, { "role": "assistant", "content": "SELECT work_email, hire_date\nFROM hospitality_technology.staff\nWHERE manager_id IS NOT NULL;" }, { "role": "user", "content": "Only incl...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo...
[ { "role": "user", "content": "Get the total number of appointments grouped by status." }, { "role": "assistant", "content": "SELECT status,\n COUNT(*) AS appointment_count\nFROM healthcare.appointments\nGROUP BY status;" }, { "role": "user", "content": "Now filter to include 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 social_media.users ( user_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "List all group chats created in 2024, showing the group_name, conversation_id, and creation time." }, { "role": "assistant", "content": "SELECT conversation_id, group_name, created_at\nFROM social_media.conversations\nWHERE is_group_chat = true AND created_at >= '20...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.patients ( patient_id character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "Which patients have a primary insurance policy and are subscribed to a plan provided by 'Cigna'? List patient ID, full name, policy number, plan ID, and insurance provider." }, { "role": "assistant", "content": "SELECT p.patient_id, p.first_name, p.last_name, pi.pol...
You are an expert in writing database language. You can write a corresponding 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": "I need a list showing the name of each law firm and the full name of every lawyer employed by that firm." }, { "role": "assistant", "content": "SELECT T1.firm_name, T2.first_name, T2.last_name FROM law_firms AS T1 JOIN lawyers AS T2 ON T1.firm_id = T2.firm_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.customers ( customer_id text, first_name text, last_name text, da...
[ { "role": "user", "content": "Show me all customers (customer_id, first_name, last_name, email) who were born after 1985 (date_of_birth > '1985-12-31') and have an email address ending with '@yahoo.com', along with their city and state information." }, { "role": "assistant", "content": "SELECT 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 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." }, { "role": "assistant", "content": "WITH max_vol AS (\n SEL...