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 hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text... | [
{
"role": "user",
"content": "For each staff member who placed a service order, show their full name and the total revenue generated from those orders.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT S.first_name, S.last_name, SUM(SO.total_price) AS total_generated_revenue FROM ho... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.claims ( claim_id text, policy_id text, customer_id text, incident_date ti... | [
{
"role": "user",
"content": "Show me claims handled by agents whose commission rate is greater than 0.1, including the claim ID, incident date, and estimated loss.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.claim_id, T1.incident_date, T1.estimated_loss FROM insurance.clai... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "List all room types along with their property name, bed type, and base rate for properties located in Canada, ordered by base rate descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT rt.type_name, p.property_name, rt.bed_type, rt.base_rate\nFR... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.tokens (
token_id character varying(64) NOT NULL, -- unique identifier for... | [
{
"role": "user",
"content": "For each token, show its token_id, decimals, and the average total_supply of all tokens with the same decimals.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.token_id,\n t.decimals,\n avg_data.avg_total_supply\nFROM web3.tokens t\nJOIN... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p... | [
{
"role": "user",
"content": "List all in-game items that are either 'Rare' or 'Epic' rarity.",
"sql": "SELECT item_id , item_name , rarity FROM in_game_items WHERE rarity = 'Rare' OR rarity = 'Epic'"
},
{
"role": "assistant",
"content": "SELECT item_id, item_name, rarity FROM in_game_items ... |
You are an expert in writing database language. You can write a corresponding 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": "Show me the order ID, order type, and asset name for all orders that resulted in at least one trade.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT o.order_id, o.order_type, a.name FROM trading_platform.orders o JOIN trading_platform.trades ... |
You are an expert in writing database language. You can write a corresponding 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.loans (
loan_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "I need a report that shows, for each account status and loan type, how many loans there are and the average principal amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.status,\n l.loan_type,\n COUNT(*) AS total_loans,\n AVG(l... |
You are an expert in writing database language. You can write a corresponding 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.",
"sql": null
},
{
"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 ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers (
customer_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "Show me all claims along with the related customer's full name and the policy number for incidents that occurred in 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.claim_id, c.incident_date, c.description, cu.first_name || ' ' || cu.last_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 trading_platform.logs ( log_id character varying(64) NOT NULL, user_id character var... | [
{
"role": "user",
"content": "For each user, list all the distinct actions they have performed along with the count of each action.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, action, COUNT(*) FROM trading_platform.logs GROUP BY user_id, action ORDER BY user_id, actio... |
You are an expert in writing database language. You can write a corresponding 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 text PRIMARY KEY, route_id text, vehicle_id text, dri... | [
{
"role": "user",
"content": "Show a list of all trips along with the first and last names of all passengers who have booked on those trips. Each result should have the trip_id, passenger first name and last name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.trip_id, p.first_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
"CREATE TABLE cex_token_balance (",
"snapshot_time character varying(32) NOT NULL, -- the ... | [
{
"role": "user",
"content": "List all CEX addresses on the BSC chain that hold more than $1 million USD value in total.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, SUM(usd_value) AS total_usd_value FROM cex_token_balance WHERE chain = 'BSC' GROUP BY address HAVING SU... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p... | [
{
"role": "user",
"content": "Show me all players who have unlocked any achievements in games released after 2020, and include the player's ID, achievement ID, the game's title, and the unlock date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pa.player_id, pa.achievement_id, 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, user_id.text, content.text, media_url.text, media... | [
{
"role": "user",
"content": "List all comments made on public posts that have a location specified, including comment_id, post_id, comment content, and the comment's created_at timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.comment_id,\n c.post_id,\n c.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 all service orders with the service_id, guest's full name, and the status of each order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so.order_id, so.service_id, g.first_name, g.last_name, so.status\nFROM hospitality_technology.service_orders ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.prescriptions ( prescription_id text, record_id text, patient_id text, do... | [
{
"role": "user",
"content": "How many prescriptions have been issued per patient?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, COUNT(*) AS prescription_count\nFROM healthcare.prescriptions\nGROUP BY patient_id;",
"sql": null
},
{
"role": "user",
"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 insurance.claim_documents (
document_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me all PDF documents uploaded by agent 'AG456', along with their claim IDs and file sizes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT claim_id, file_size_bytes FROM insurance.claim_documents WHERE mime_type = 'application/pdf' AND uploaded_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 healthcare.medical_records (
record_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show all patients who have received a prescription for medication ID 'med123' and also have a diagnosis code of 'I10'. Include patient ID, prescription ID, and diagnosis date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT p.patient_id, p.pr... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List the names of active services and their categories provided by agencies with a 'Federal' jurisdiction level.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.service_name, T1.category FROM government_services.services AS T1 JOIN government_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 token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,... | [
{
"role": "user",
"content": "List all ERC20 tokens where the price is between $1 and $10, including their names, symbols, and contract addresses.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tm.name, tm.symbol, tm.contract_address FROM token_metas tm JOIN token_prices_latest t... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern... | [
{
"role": "user",
"content": "How many players are registered for each country? Return the country_code and the player count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT country_code, COUNT(*) AS player_count FROM gaming_technology.players GROUP BY country_code;",
"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 blockchain.wallets ( wallet_id text, user_id text, address_id text, private_key text... | [
{
"role": "user",
"content": "Show me all wallet addresses along with their private keys for users who have more than 3 wallets.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT w1.address_id, w1.private_key FROM blockchain.wallets w1 INNER JOIN (SELECT user_id FROM blockchain.wall... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "Show all payments made for reservations that had more than 2 adults. Include the payment ID, amount, currency, reservation ID, guest full name, and the number of adults in the reservation.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.payment_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, user_id.text, address.text, private_key.text, created... | [
{
"role": "user",
"content": "Find the address and creation date of all wallets whose private keys start with '0xabc'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address, created_at FROM web3.wallets WHERE private_key LIKE '0xabc%';",
"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 hospitality_technology.room_types (
room_type_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "List properties and the average base rate of their room types.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.property_name , AVG(T2.base_rate) FROM hospitality_technology.properties AS T1 JOIN hospitality_technology.room_types AS T2 ON T1.proper... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id text PRIMARY KEY, agency_name text, jurisdi... | [
{
"role": "user",
"content": "Find all agencies established before 2010. Return agency_id, agency_name, and established_date, ordered by established_date ascending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agency_id, agency_name, established_date\nFROM government_services.a... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policy_beneficiaries ( beneficiary_id text PRIMARY KEY, policy_id text, cu... | [
{
"role": "user",
"content": "Show me all beneficiaries who are listed as 'Sibling' or 'Parent' on policies where their share is between 20 and 60 percent. Include beneficiary_id, policy_id, first_name, last_name, relationship, and percentage_share.",
"sql": null
},
{
"role": "assistant",
"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.customers ( customer_id text, first_name text, last_name text, date_of_bir... | [
{
"role": "user",
"content": "Return the customer_id, full name, policy_id, and start date of all policies sold by agents whose commission_rate is less than 0.08. Please also include the product_name of the related insurance product.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.payments ( payment_id text, reservation_id text, guest_id tex... | [
{
"role": "user",
"content": "List all payments made using a credit card, including guest_id, amount, payment_method, and payment_timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT guest_id, amount, payment_method, payment_timestamp FROM hospitality_technology.payments WHE... |
You are an expert in writing database language. You can write a corresponding 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 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.rooms ( room_id.text, property_id.text, room_number.text, roo... | [
{
"role": "user",
"content": "For each reservation made in January 2024, show the guest's full name, reservation ID, check-in date, and the property name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.first_name, g.last_name, r.reservation_id, r.check_in_date, r.property_id\nF... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "Show me a list of all achievements with their name, point value, and the title of the game they are part of.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n T1.name,\n T1.points,\n T2.title\nFROM gaming_technology.achievements AS T1\nJOIN gaming_... |
You are an expert in writing database language. You can write a corresponding 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": "List all addresses (address_line1, city, state) where more than one customer resides, and show how many customers share each address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT address_line1,\n city,\n state,\n COUNT(*) AS resid... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "How many notifications are there for each status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n status,\n COUNT(*) AS notification_count\nFROM government_services.notifications\nGROUP BY status;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts ( account_id text, customer_id text, account_number text... | [
{
"role": "user",
"content": "What is the average interest rate for each account type?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT account_type, AVG(interest_rate) FROM financial_services.accounts GROUP BY account_type;",
"sql": null
},
{
"role": "user",
"conte... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
"CREATE TABLE smart_money_token_inflow (",
"token_address character varying(100) NOT NULL, ... | [
{
"role": "user",
"content": "Which token has the highest net USD value difference between buys and sells? Show token_symbol, chain, narrative, average buy price, average sell price, and the net difference.",
"sql": null
},
{
"role": "assistant",
"content": "WITH buys AS (\n SELECT token_ad... |
You are an expert in writing database language. You can write a corresponding 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": "List each service_type and the number of maintenance logs performed for that type, only including service_types with more than 10 records.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_type,\n COUNT(*) AS log_count\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 healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id... | [
{
"role": "user",
"content": "Show me each patient and doctor pair that have both an active chronic diagnosis and at least one prescription recorded in the same medical record. Include patient_id, doctor_id, diagnosis_date, prescription_date, and medication_id.",
"sql": null
},
{
"role": "assist... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.room_types (
room_type_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "List all room types with their type name, base rate, and the name of the property they belong to.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT rt.room_type_id, rt.type_name, rt.base_rate, p.property_name\nFROM hospitality_technology.room_types rt\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 insurance.policies (
policy_id character varying(64) NOT NULL, -- unique identif... | [
{
"role": "user",
"content": "List all premium payments made by Bank Transfer where the amount_paid is greater than 5000. Show payment_id, policy_id, customer_id, amount_paid, and payment_date, ordered by amount_paid descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT paym... |
You are an expert in writing database language. You can write a corresponding 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": "Count the number of policies by their status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS policy_count\nFROM insurance.policies\nGROUP BY status;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.employees (
employee_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "Give me a count of employees hired in each department for employees currently active or terminated.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT department, status, COUNT(employee_id) AS employee_count FROM financial_services.employees WHERE status... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.prescriptions ( prescription_id text PRIMARY KEY, record_id text, patient... | [
{
"role": "user",
"content": "List each doctor and how many prescriptions they have written, sorted by the highest count first.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT doctor_id, COUNT(*) AS prescription_count\nFROM healthcare.prescriptions\nGROUP BY doctor_id\nORDER BY pr... |
You are an expert in writing database language. You can write a corresponding 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": "How many active insurance policies does each patient have? Return patient_id and active_policy_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id,\n COUNT(*) AS active_policy_count\nFROM healthcare.patient_insurance\nWHERE expirat... |
You are an expert in writing database language. You can write a corresponding 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": "List all document IDs, file names, and uploaded timestamps for documents that were uploaded on a weekend.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, file_name, uploaded_at FROM insurance.claim_documents WHERE EXTRACT(DOW FROM uploade... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREA... | [
{
"role": "user",
"content": "What is the maintenance schedule for platform 3 at station DEF for the next month?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to the maintenance schedule for platforms. The data I have only includes static information ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.claims ( claim_id text PRIMARY KEY, policy_id text, customer_id text, inci... | [
{
"role": "user",
"content": "List all claims reported in the year 2023 and include the first and last name of any beneficiaries listed on the related policy. Show claim_id, incident_date, beneficiary first name, beneficiary last name.",
"sql": null
},
{
"role": "assistant",
"content": "SELE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "Which developers have been founded before 2005? Show their name and country.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, country\nFROM gaming_technology.developers\nWHERE founded_year < 2005;",
"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 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 transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"role": "user",
"content": "Can you list all route numbers and their corresponding distance in km for routes that start in 'San Francisco'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.route_number, r.distance_km\nFROM transportation.routes r\nJOIN transportation.locations ... |
You are an expert in writing database language. You can write a corresponding 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.service_orders ( order_id text PRIMARY KEY, reservation_id te... | [
{
"role": "user",
"content": "Show the total revenue and the average order value for each order status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, SUM(total_price) AS total_revenue, AVG(total_price) AS avg_order_value FROM hospitality_technology.service_orders GROUP 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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "List all appointments along with the patient's full name and the doctor's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n a.appointment_id,\n a.appointment_time,\n p.first_name AS patient_first_name,\n p.last_name AS patient_last_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 social_media.users ( user_id text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "How many users have disabled push notifications?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) AS disabled_push_count\nFROM social_media.user_settings\nWHERE push_notifications_enabled = false;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.posts ( post_id.text, user_id.text, content.text, media_url.text, media... | [
{
"role": "user",
"content": "List the content and creation time of all posts made in the last 7 days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT content, created_at FROM social_media.posts WHERE created_at >= NOW() - INTERVAL '7 day';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "Show me each player's username, the names of achievements they've unlocked, the game title each achievement belongs to, and the points for each achievement.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.username, a.name AS achievement_name, g.titl... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "Show me the top 5 NFT collections with the highest token count, along with their names, symbols, and floor prices, but only include collections with a floor price greater than 0.5 ETH.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT nc.name, nc.symbol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Node Label ':AircraftModel'. Properties: { model_id: String (Constraint: UNIQUE), model_name: Str... | [
{
"role": "user",
"content": "我想查询某个飞机构建的所有检查记录,包括检查类型、检查结果、检查时间以及被检查的组件名称。",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (ab:AircraftBuild)-[:UNDERWENT]->(i:Inspection)-[:INSPECTED_COMPONENT]->(c:Component)\nWHERE ab.build_id = 'specific_build_id'\nRETURN i.inspection_type, i.re... |
You are an expert in writing database language. You can write a corresponding 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.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_id, from_address, to_address, block... |
You are an expert in writing database language. You can write a corresponding 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": "Show me the top 5 users who have created the most wallets, along with their email addresses and the total number of wallets they created.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.email, COUNT(w.wallet_id) AS wallet_count FROM tradi... |
You are an expert in writing database language. You can write a corresponding 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.user_settings ( setting_id text PRIMARY KEY, user_id text, theme text, ... | [
{
"role": "user",
"content": "Show me all user IDs who changed their profile settings after June 1, 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id FROM social_media.user_settings WHERE updated_at > '2024-06-01';",
"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 smart_money_token_inflow ( token_address character varying(100) NOT NULL, -- the tok... | [
{
"role": "user",
"content": "For each chain, which token had the highest number of smart money addresses buying it this week? Show the token symbol and narrative too.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT chain, token_symbol, narrative, MAX(address_amount) AS max_buyers... |
You are an expert in writing database language. You can write a corresponding 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": "Give me the number of lawyers and average tenure in years for each specialization.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT specialization,\n COUNT(*) AS lawyer_count,\n AVG(DATE_PART('year', AGE(CURRENT_DATE, hire_date))) AS avg_te... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id.text, first_name.text, last_name.text, company_na... | [
{
"role": "user",
"content": "List all documents along with the case number they are associated with, as well as the name and email of the lawyer who uploaded them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.document_name, d.document_type, d.case_id, l.first_name || ' ' || ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.loans ( loan_id character varying(64) NOT NULL, account_id charac... | [
{
"role": "user",
"content": "List all auto loans (loan_id, principal_amount, interest_rate) where the current principal balance is less than 40% of the original principal amount, along with the account_id and the difference between principal_amount and current_principal_balance.",
"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 government_services.services ( service_id text PRIMARY KEY, agency_id text, service_... | [
{
"role": "user",
"content": "Show the service names that had documents uploaded for their applications in the calendar year 2023.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.service_name FROM government_services.services AS T1 JOIN applications AS T2 ON T1.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 government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "Which citizens have scheduled appointments at locations located in 'New York'? Show their first and last name as well as the location name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.first_name, c.last_name, sl.location_name\nFROM gove... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games (
game_id uuid NOT NULL DEFAULT gen_random_uuid(), -- un... | [
{
"role": "user",
"content": "Show me the average number of current players per server for each region.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT region, AVG(current_players) AS avg_current_players\nFROM gaming_technology.servers\nGROUP BY region;",
"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.games ( game_id uuid, title text, developer_id uuid, publisher_id ... | [
{
"role": "user",
"content": "Could you list each game title along with its developer's name and the total number of servers hosting it?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, d.name AS developer_name, COUNT(s.server_id) AS server_count\nFROM gaming_technology.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 legal_services.law_firms (
firm_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all law firms that share the same address with another firm, showing both firm names and the address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f1.firm_name AS firm_a, f2.firm_name AS firm_b, f1.address\nFROM law_firms f1\nJOIN law_firms f2... |
You are an expert in writing database language. You can write a corresponding 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.appointments ( appointment_id text, citizen_id text, employee_id... | [
{
"role": "user",
"content": "Show me all appointment IDs and their scheduled start times along with the employee ID and service ID for appointments that have been booked using the 'Kiosk' booking method.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, scheduled_st... |
You are an expert in writing database language. You can write a corresponding 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.fuel_logs ( fuel_log_id character varying(64) NOT NULL, vehicle_id ch... | [
{
"role": "user",
"content": "Find all pairs of fuel log entries for the same vehicle that occurred on the same calendar day. Show vehicle ID, the two log IDs, and their timestamps.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n f1.vehicle_id,\n f1.fuel_log_id AS log_id_1... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.market_data (
data_point_id bigserial NOT NULL, -- auto-incre... | [
{
"role": "user",
"content": "For each date in the last 30 days with market data, show the total volume and the maximum high price recorded.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT data_timestamp::date, SUM(volume) AS total_volume, MAX(high_price) AS max_high_price FROM 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 financial_services.market_data ( data_point_id bigserial NOT NULL, security_id chara... | [
{
"role": "user",
"content": "I'd like a report showing for each sector the average close_price and maximum volume from market_data for the previous quarter.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.sector, AVG(md.close_price) AS avg_close_price, MAX(md.volume) AS max_vol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players (
player_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "Show a list of all game developers with their name and founded year.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n name,\n founded_year\nFROM gaming_technology.developers;",
"sql": null
},
{
"role": "user",
"content": "Please fil... |
You are an expert in writing database language. You can write a corresponding 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": "Show me all drivers and the vehicles they are assigned for trips that have status 'Delayed'. Include driver first_name, driver last_name, vehicle license_plate, trip_id, and actual_departure.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.first_nam... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "Show me the full name of each citizen and the status of their latest application, along with the name of the service and the agency responsible for that service.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.first_name, c.last_name, a.status, s.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 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 government_services.service_locations (
location_id character varying(64) NOT NU... | [
{
"role": "user",
"content": "List the names and cities of all service locations, along with the agency ID, where the locations are marked as accessible.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_name, city, agency_id FROM government_services.service_locations WHERE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.documents (
document_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "List the full names and job titles of all employees who have not verified any documents.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, e.job_title FROM government_services.employees AS e LEFT JOIN government_services.docum... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE 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.",
"sql": null
},
{
"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 = ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games ( game_id uuid NOT NULL DEFAULT gen_random_uuid(), title cha... | [
{
"role": "user",
"content": "Can you show me the total number of items acquired by each player, along with the title of each game and the player's ID?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pi.player_id, g.title AS game_title, SUM(pi.quantity) AS total_items_acquired\nFR... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id text, first_name text, last_name text, company_na... | [
{
"role": "user",
"content": "List the first_name, last_name, and email of all clients whose email domain is 'gmail.com'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email FROM legal_services.clients WHERE SUBSTRING(email FROM POSITION('@' IN email) + 1)... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List pairs of verified citizens who share the same primary address city. Show the city, the full name of the first citizen, and the full name of the second citizen.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SPLIT_PART(c1.primary_address, ', ', 2... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users (
user_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "Show all wallet addresses that have ever received a UTXO.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT address\nFROM trading_platform.utxos;",
"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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop... | [
{
"role": "user",
"content": "List the full name (first name and last name) and position of all staff members working at properties located in 'California'. Include the name of the property they work at.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_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.lawyers (
lawyer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all time entries for lawyers specializing in 'Criminal Law'. Show the entry ID, the date worked, hours spent, and the first and last name of the lawyer who performed the work.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT te.entry_id, te.date_w... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.services ( service_id text PRIMARY KEY, property_id text, ser... | [
{
"role": "user",
"content": "For each department, what is the highest priced available service? Please show department, service_name, and price.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT department, service_name, price FROM hospitality_technology.services WHERE is_available... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t... | [
{
"role": "user",
"content": "List all ERC20 token symbols and their latest prices for tokens where the total supply is greater than '100000000000000000000'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.symbol, T2.price FROM token_metas AS T1 JOIN token_prices_latest AS T2 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.clients ( client_id.text, first_name.text, last_name.text, company_na... | [
{
"role": "user",
"content": "Show all cases with their case number and name, along with the number of documents uploaded for each case.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.case_number, c.case_name, COUNT(d.document_id) AS document_count\nFROM legal_services.cases 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.customers ( customer_id character varying(64) NOT NULL, first_name charact... | [
{
"role": "user",
"content": "Show all beneficiaries who were added in 2024 for any policy. List their beneficiary_id, first and last name, relationship, and the policy_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT beneficiary_id, first_name, last_name, relationship, policy_... |
You are an expert in writing database language. You can write a corresponding 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": "Which documents have a version number of at least 5? List their document_name, case_id, and version.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_name, case_id, version\nFROM legal_services.documents\nWHERE version >= 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 insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex... | [
{
"role": "user",
"content": "List the product_id, product_name, and base_premium for all products that are currently inactive.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_id, product_name, base_premium\nFROM insurance.insurance_products\nWHERE is_active = false;",
... |
You are an expert in writing database language. You can write a corresponding 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.service_orders ( order_id text, reservation_id text, guest_id... | [
{
"role": "user",
"content": "Find guests who ordered the same service more than once on the same reservation and date. Return guest_id, reservation_id, service_id, and the date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so1.guest_id,\n so1.reservation_id,\n so1.... |
You are an expert in writing database language. You can write a corresponding 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": "Find transaction IDs in the utxos table that have both spent and unspent UTXOs associated with them. List these transaction IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT transaction_id FROM trading_platform.utxos GROUP BY transaction_id HAVING ... |
You are an expert in writing database language. You can write a corresponding 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": "Get me a list of law firms with the firm_name, founded_date, the managing partner's full name, and the total number of partners at that firm.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f.firm_name, f.founded_date, mp.first_name || ' ' || mp.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 gaming_technology.servers ( server_id uuid, game_id uuid, server_name text, region t... | [
{
"role": "user",
"content": "Can you show me the number of servers in each region, as well as the total max_players for each region?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT region, COUNT(*) AS server_count, SUM(max_players) AS total_max_players FROM gaming_technology.serv... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id text PRIMARY KEY, agency_name text, jurisdi... | [
{
"role": "user",
"content": "For each agency, list the agency name and the total count of employees who have a recorded termination date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agency_name, COUNT(e.employee_id) FROM government_services.agencies AS a LEFT JOIN governmen... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p... | [
{
"role": "user",
"content": "Show the game title and the count of hidden achievements for each game.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.title , COUNT(T2.achievement_id) FROM games AS T1 JOIN achievements AS T2 ON T1.game_id = T2.game_id WHERE T2.hidden = TRUE ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.transactions (
transaction_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "List employees whose transaction effective_date matches their hire_date anniversary. Show full name and count of such transactions.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.employee_id,\n e.first_name || ' ' || e.last_name AS employee_n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.