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 blockchain.nodes ( node_id character varying(64) NOT NULL, ip_address character vary... | [
{
"role": "user",
"content": "List each port along with the count of distinct IP addresses observed on that port.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT port, COUNT(DISTINCT ip_address) AS unique_ip_count FROM blockchain.nodes GROUP BY port;",
"sql": null
},
{
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp.timestamp, block_number.bigint, transaction_hash.text,... | [
{
"role": "user",
"content": "List all SUI coins that have status 'exists' in both `sui_coins` and `sui_coins_metadata`. Show their `coin_type`, `balance`, and `owner`.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT sc.coin_type, sc.balance, sc.owner FROM sui_coins sc JOIN sui_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 legal_services.clients ( client_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "Show me all appointments where the subject contains the word 'Meeting', including the appointment ID, start time, end time, and subject.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id , start_time , end_time , subject FROM legal_ser... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.users ( user_id.text, username.text, email.text, password_hash.text, created_at... | [
{
"role": "user",
"content": "Find all pairs of users where the registration times are within 30 minutes of each other, and show both user IDs, usernames, and the time difference in minutes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u1.user_id AS user1_id, u1.username AS 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 social_media.users ( user_id text PRIMARY KEY, username text, email text, password_h... | [
{
"role": "user",
"content": "List usernames and the length of their 'bio' field for users whose 'is_verified' status is true.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT username, LENGTH(bio) AS bio_length FROM social_media.users WHERE is_verified IS TRUE;",
"sql": null
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "Show all ERC20 token approvals that happened between block numbers 18000000 and 18500000, including the contract address and number of approvals per contract.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, COUNT(*) AS approval_count... |
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 current location of train number Acela 2151?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to real-time location data for trains. The database only contains static information such as train ID, model, capacity... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.player_inventory (
inventory_id uuid NOT NULL DEFAULT gen_rand... | [
{
"role": "user",
"content": "Can you show the total quantity of all in-game items held by each player?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id, SUM(quantity) AS total_quantity\nFROM gaming_technology.player_inventory\nGROUP BY player_id;",
"sql": null
},
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.claim_documents (
document_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List all claim documents for claims handled by the claim handler with ID 'HANDLER_007'. Show document ID, file name, upload time, and claim ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cd.document_id, cd.file_name, cd.uploaded_at, cd.claim_id F... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.comments (
comment_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "Show me all users who have made at least one comment and have their profiles set to private. I want their user IDs and the time their settings were last updated.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.user_id, us.updated_at\nFROM s... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.fuel_logs (
fuel_log_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List consecutive fueling events for each vehicle where the refill quantity increased compared to the previous event. Include vehicle_id, previous timestamp and quantity, current timestamp and quantity.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id.text, agency_name.text, jurisdiction_level.... | [
{
"role": "user",
"content": "How many agencies exist at each jurisdiction level?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT jurisdiction_level, COUNT(*) AS agency_count\nFROM government_services.agencies\nGROUP BY jurisdiction_level;",
"sql": null
},
{
"role": "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 social_media.users ( user_id character varying(64) NOT NULL, username character vary... | [
{
"role": "user",
"content": "Find all users who have set their bio to a non-empty value, showing their username and email.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT username, email\nFROM social_media.users\nWHERE bio IS NOT NULL AND TRIM(bio) != '';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo... | [
{
"role": "user",
"content": "Show me prescriptions with a route of 'Intravenous' and a frequency of 'Once Daily'. I need the prescription ID, medication ID, route, and frequency.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id , medication_id , route , frequenc... |
You are an expert in writing database language. You can write a corresponding 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": "Find pairs of documents in the same case where one document is version 1 and the other is the highest version for that document_name, showing case_id, document_name, version1, latest_version, version1_upload_timestamp, and latest_upload_timestamp.",
"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 transportation.routes (
route_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "What is the average estimated_duration_minutes for each route type?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT type, AVG(estimated_duration_minutes) AS avg_duration FROM transportation.routes GROUP BY type;",
"sql": null
},
{
"role": ... |
You are an expert in writing database language. You can write a corresponding 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 all drivers along with the make and model of each vehicle they have been assigned to for trips.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT d.driver_id, d.first_name || ' ' || d.last_name AS driver_full_name, v.make, v.model\nFROM tr... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.payments (
payment_id character varying(64) NOT NULL, --... | [
{
"role": "user",
"content": "Identify duplicate transaction_ref values and list each reference with the pair of payment_ids that share it.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.transaction_ref, p1.payment_id AS payment_id_1, p2.payment_id AS payment_id_2\nFROM hospit... |
You are an expert in writing database language. You can write a corresponding 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.patient_insurance ( patient_insurance_id text, patient_id text, plan_id t... | [
{
"role": "user",
"content": "How many insurance policies have 'Group' in their group_number?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM healthcare.patient_insurance WHERE group_number ILIKE '%Group%';",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... | [
{
"role": "user",
"content": "List all SUI coin types, symbols, names, and their status from the `sui_coins_metadata` table where the status is 'exists'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT coin_type, symbol, name, status FROM sui_coins_metadata WHERE status = 'exists'... |
You are an expert in writing database language. You can write a corresponding 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, first_nam... | [
{
"role": "user",
"content": "For each department, what is the earliest and latest employee hire date?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT department, MIN(hire_date) AS earliest_hire_date, MAX(hire_date) AS latest_hire_date FROM financial_services.employees GROUP BY de... |
You are an expert in writing database language. You can write a corresponding 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 cancelled policies, with their policy number, end date, and cancellation reason.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT policy_number, end_date, cancellation_reason \nFROM insurance.policies \nWHERE status = 'Cancelled';",
"sql":... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles ( vehicle_id text, license_plate text, vin text, make text, ... | [
{
"role": "user",
"content": "List the full name of each driver and the city of the depot where their assigned vehicle is located.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.first_name, d.last_name, l.city\nFROM transportation.drivers d\nJOIN transportation.trips t ON d.dri... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text PRIMARY KEY, first_name text, last_name text, ... | [
{
"role": "user",
"content": "List appointment_id, appointment_time, patient\\u2019s full name, and doctor\\u2019s specialty for all appointments scheduled in the next 7 days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.appointment_id, a.appointment_time, p.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 social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu... | [
{
"role": "user",
"content": "List the content and creation time of posts made by users who have a private profile.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.content, T1.created_at FROM social_media.posts AS T1 JOIN social_media.users AS T2 ON T1.user_id = T2.user_id JOIN... |
You are an expert in writing database language. You can write a corresponding 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": "List all appointments that took place at 'Central Office', showing appointment_id, client_id, and subject.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, client_id, subject FROM legal_services.appointments WHERE location = 'Central Of... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.game_sessions ( session_id uuid, player_id uuid, game_id uuid, ser... | [
{
"role": "user",
"content": "Can you show me each player's total number of achievements unlocked and the total quantity of items they have in inventory for each game they've played?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pa.player_id, a.game_id, COUNT(DISTINCT pa.achieve... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.developers ( developer_id uuid, name text, country text, founded_y... | [
{
"role": "user",
"content": "Could you list all pairs of developers in the same country but different companies? Return developer1, developer2, and country.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.name AS developer1,\n d2.name AS developer2,\n d1.country\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(), usern... | [
{
"role": "user",
"content": "List all in-game items of type 'Consumable', showing for each item the item name, cost amount, and the total number of players who have that item in their inventory.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT i.item_name, i.cost_amount, COUNT(DIS... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.guests ( guest_id.text, first_name.text, last_name.text, emai... | [
{
"role": "user",
"content": "Find guests born before 1990 who have 'Pet Friendly' in their preferences. List their full name (first and last) and date of birth.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, date_of_birth FROM hospitality_technology.guests... |
You are an expert in writing database language. You can write a corresponding 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, policy_id text, customer_id te... | [
{
"role": "user",
"content": "How many beneficiaries were added on each unique date?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DATE(added_at), COUNT(*) FROM insurance.policy_beneficiaries GROUP BY DATE(added_at);",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers ( lawyer_id text PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "List all time entries showing the lawyer's full name, the case name, hours spent, and description.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT CONCAT(l.first_name, ' ', l.last_name) AS lawyer_name, c.case_name, te.hours_spent, te.description\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 gaming_technology.players ( player_id.uuid, username.text, email.text, password_hash... | [
{
"role": "user",
"content": "Which servers are currently 'online' and located in the 'us-west-2' region, and what is the title of the game each server is hosting?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.server_id, s.server_name, s.region, g.title AS game_title\nFROM gam... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.developers ( developer_id uuid PRIMARY KEY, name text, country tex... | [
{
"role": "user",
"content": "Find all pairs of developers in the same country but founded in different years. Show developer1, developer2, country, founded_year of each.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d1.name AS developer1,\n d2.name AS developer2,\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 web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "List all events and any token transfers that occurred in the same transaction, showing event_id, event_name, transfer_id, and token_symbol.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n e.event_id,\n e.event_name,\n tt.transfer_id,\n tk.token_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "How many rooms are currently marked as 'OutOfOrder'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT count(*) FROM hospitality_technology.rooms WHERE status = 'OutOfOrder';",
"sql": null
},
{
"role": "user",
"content": "Also, show the ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.services ( service_id.text, agency_id.text, service_name.text, d... | [
{
"role": "user",
"content": "Show me all services, their names, and their online application URLs for services that are both active and have an online application available.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_name, online_application_url FROM 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 gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "Can you find all players who registered in 2023 and unlocked at least one achievement?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT p.player_id, p.username\nFROM gaming_technology.players p\nJOIN gaming_technology.player_achievements pa 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 legal_services.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c... | [
{
"role": "user",
"content": "Show me all appointments that have both a non-null location and notes, along with their appointment_id, client_id, lawyer_id, and start_time.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, client_id, lawyer_id, start_time FROM legal_s... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "Find all users who have wallets but have never logged any actions, along with their wallet creation date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.email, w.created_at AS wallet_created_at FROM trading_platform.users u JOIN trading_... |
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREA... | [
{
"role": "user",
"content": "What are the environmental impact assessments for the production of the Airbus A350 model?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to data regarding the environmental impact assessments for the production of specifi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.notifications ( notification_id.text, citizen_id.text, applicati... | [
{
"role": "user",
"content": "For each application that has at least one failed notification, provide the application ID, the total number of notifications received for that application, and the count of failed notifications.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT applica... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- unique identifier... | [
{
"role": "user",
"content": "List all premium payments with the amount_paid exactly 1000, showing the payment_id and payment_date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT payment_id, payment_date\nFROM insurance.premium_payments\nWHERE amount_paid = 1000;",
"sql": nul... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text... | [
{
"role": "user",
"content": "Show prescriptions with their corresponding chief complaint from the medical record. Return prescription_id, record_id, and chief_complaint.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.prescription_id, p.record_id, mr.chief_complaint\nFROM healt... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.insurance_products (
product_id character varying(64) NOT NULL, -- uni... | [
{
"role": "user",
"content": "Show me the product ID, name, and description for insurance products where the description contains the word 'policy'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_id, product_name, description FROM insurance.insurance_products WHERE descri... |
You are an expert in writing database language. You can write a corresponding 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 usernames and their respective group chat names where they are participants.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, c.group_name \nFROM social_media.conversation_participants cp\nJOIN social_media.users u ON cp.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 smart_money_token_inflow ( token_address character varying(100) NOT NULL, -- the tok... | [
{
"role": "user",
"content": "List all token symbols related to the 'Gaming' narrative that had a net positive token inflow.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol FROM smart_money_token_inflow WHERE narrative = 'Gaming' AND usd_value > 0 GROUP BY token_symbo... |
You are an expert in writing database language. You can write a corresponding 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.text, post_id.text, hashtag_id.text )
C... | [
{
"role": "user",
"content": "List all conversation participants along with post_hashtag details where the participant's user_id matches the hashtag_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cp.conversation_id, cp.user_id, ph.post_id, ph.hashtag_id\nFROM social_media.con... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts (
account_id character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "Show me all accounts (account_id, account_number, balance) that have a balance greater than $50,000 and are in USD currency, along with the security details (ticker_symbol, security_name) for securities traded on the same exchange as the account's last_updated_at date.",
"s... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id character varying(64) NOT NULL, customer_id character... | [
{
"role": "user",
"content": "List all policies that have a coverage limit greater than 750000 and a premium amount greater than 1000. Show the policy number, product ID, coverage limit, and premium amount.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n policy_number,\n produ... |
You are an expert in writing database language. You can write a corresponding 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": "Retrieve all active staff members who processed payments in USD within the last 30 days. Return staff first_name, last_name, property_name, and the count of payments processed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.first_name, s.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 financial_services.securities ( security_id.text, ticker_symbol.text, isin_code.text... | [
{
"role": "user",
"content": "For each sector, could you show the sum of volume and the average close price from market_data, including the sector name?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.sector, SUM(md.volume) AS total_volume, AVG(md.close_price) AS avg_close_price... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List all smoking rooms, showing the property name, room number, and room type name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.property_name, T2.room_number, T3.type_name FROM hospitality_technology.properties AS T1 JOIN hospitality_technology... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"role": "user",
"content": "Retrieve route_number, description, and distance_km for routes that have a distance greater than the average distance of all routes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_number, description, distance_km\nFROM transportation.routes\nWH... |
You are an expert in writing database language. You can write a corresponding 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 text PRIMARY KEY, contract_address text, token_name text, tok... | [
{
"role": "user",
"content": "What is the average total_supply for each decimals value?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT decimals, AVG(total_supply) AS avg_supply\nFROM web3.tokens\nGROUP BY decimals;",
"sql": null
},
{
"role": "user",
"content": "Ac... |
You are an expert in writing database language. You can write a corresponding 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": "For each game and month, I'd like to see how many sessions started, showing game_id, title, and start_month.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.game_id,\n g.title,\n DATE_TRUNC('month', gs.start_time) AS start_month,\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 healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text... | [
{
"role": "user",
"content": "For each medication manufacturer, show the total number of distinct generic names they produce.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT manufacturer, COUNT(DISTINCT generic_name) AS distinct_generic_name_count FROM healthcare.medications 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 social_media.users (
user_id character varying(64) NOT NULL, -- unique identifi... | [
{
"role": "user",
"content": "Show me the usernames and email addresses for users who have a non-empty bio and are verified.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT username, email FROM social_media.users WHERE bio IS NOT NULL AND bio != '' AND is_verified = TRUE;",
"s... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.clients ( client_id.text, first_name.text, last_name.text, company_na... | [
{
"role": "user",
"content": "List the full name, specialization, and firm name for all lawyers who are not partners.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T1.specialization, T2.firm_name FROM lawyers AS T1 JOIN law_firms 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 social_media.users ( user_id text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "Show me the full names of users and the total number of likes they have given to comments.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.full_name, COUNT(l.like_id) AS likes_given_to_comments\nFROM social_media.users u\nJOIN social_media.likes l 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 PRIMARY KEY, first_name text, last_name text... | [
{
"role": "user",
"content": "I need the case_number, client's full name, case_type, and status for all cases.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.case_number,\n cl.first_name || ' ' || cl.last_name AS client_name,\n c.case_type,\n c.status\nFROM le... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "List each player who has both unlocked achievements and owns items. Show player_id, username, achievement_count, and distinct_item_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n p.player_id,\n p.username,\n COUNT(DISTINCT pa.achievement_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 insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,... | [
{
"role": "user",
"content": "List all active policies, showing the policy number, the customer's full name, and the agent's full name who sold the policy.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.policy_number, T2.first_name, T2.last_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 social_media.comments ( comment_id.text, post_id.text, user_id.text, parent_comment_... | [
{
"role": "user",
"content": "Count the total number of comments each user has made.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT user_id, COUNT(*) AS comment_count FROM comments GROUP BY user_id;",
"sql": null
}
] |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "For each contract deployed on network 'mainnet', show its address, status, the number of tokens created by that contract's address, and the total number of events emitted by that contract.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n c.address A... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"role": "user",
"content": "Which fundraising round has the highest total investment across all projects?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n rounds_name,\n SUM(investment_value) AS total_investment\nFROM project_fundraising_record\nGROUP BY rounds_name\nORDER BY... |
You are an expert in writing database language. You can write a corresponding 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": "Get each property's name and the number of distinct service categories it offers.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name,\n COUNT(DISTINCT s.category) AS category_count\nFROM hospitality_technology.properties p\nLEFT JOI... |
You are an expert in writing database language. You can write a corresponding 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": "Provide a list of all customers whose status is 'Active' and show their customer_id, full name, and email address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT customer_id, first_name || ' ' || last_name AS full_name, email\nFROM insurance.customer... |
You are an expert in writing database language. You can write a corresponding 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.dapps (
dapp_id character varying(64) NOT NULL, -- unique iden... | [
{
"role": "user",
"content": "Show me the names and URLs of all DApps, and for each DApp, list the KYC status and last review date for all users who have an audit entry.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.name AS dapp_name, d.url, k.user_id, k.status, k.reviewed_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 gaming_technology.servers (
server_id uuid NOT NULL DEFAULT gen_random_uuid(), -... | [
{
"role": "user",
"content": "I want to find regions where the average number of current_players across servers exceeds 200. Provide a SQL query that lists each region and its average current_players.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT region, AVG(current_players) 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 transportation.trips ( trip_id text PRIMARY KEY, route_id text, vehicle_id text, dri... | [
{
"role": "user",
"content": "For each pair of origin and destination location IDs, show the number of completed trips between them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT origin_location_id, destination_location_id, COUNT(*) AS completed_trip_count FROM transportation.tr... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text, route_number text, description text, origin_l... | [
{
"role": "user",
"content": "Show me the total fuel cost for each trip along with the trip's route number and the type of the route.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.trip_id, r.route_number, r.type, SUM(f.total_cost) AS total_fuel_cost\nFROM transportation.trips ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id uuid PRIMARY KEY, username text, email text, p... | [
{
"role": "user",
"content": "Which achievements have the highest unlock counts? List the top 5 achievement names along with the number of distinct players who unlocked each.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.name,\n COUNT(DISTINCT pa.player_id) AS player_cou... |
You are an expert in writing database language. You can write a corresponding 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 text, case_id text, lawyer_id text, date_work... | [
{
"role": "user",
"content": "Show me the total hours worked and total amount billed for each case that has associated invoices, along with the case ID and invoice number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.case_id, i.invoice_number, SUM(t.hours_spent) AS total_hour... |
You are an expert in writing database language. You can write a corresponding 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.applications ( application_id text, citizen_id text, service_id ... | [
{
"role": "user",
"content": "For each citizen, show their citizen ID and the total number of applications and notifications they have.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.citizen_id,\n COALESCE(a.application_count, 0) AS application_count,\n COALESCE(n.n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.appointments ( appointment_id text, client_id text, lawyer_id text, c... | [
{
"role": "user",
"content": "Show me all appointments with their subjects and the names of the lawyers who handled them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.appointment_id, a.subject, l.first_name, l.last_name\nFROM legal_services.appointments a\nJOIN legal_services... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.player_achievements ( player_achievement_id uuid, player_id uuid, ... | [
{
"role": "user",
"content": "Show me the number of unique achievements unlocked by each player.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id, COUNT(DISTINCT achievement_id) AS unique_achievements_unlocked\nFROM gaming_technology.player_achievements\nGROUP BY player_i... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies (
policy_id character varying(64) NOT NULL, -- unique identif... | [
{
"role": "user",
"content": "Identify agents who have sold overlapping policies. Return agent_id, policy_number1, policy_number2, and their coverage dates.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.agent_id,\n p1.policy_number AS policy_number1,\n p2.policy_n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List the full names of citizens who have made payments for services in the 'Transportation' category, showing the payment amount and the service name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T2.amount, T3.service_n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var... | [
{
"role": "user",
"content": "Show me the top 3 narratives by trend rank, along with their top 3 coins and 24-hour trading volume from the narrative_info table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT narrative, top_3_coins, volume_24h FROM narrative_info ORDER BY trend_ra... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me the room number, floor, and the name of the property for all rooms located in properties in Texas.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.room_number, T1.floor, T2.property_name FROM hospitality_technology.rooms AS T1 JOIN hospital... |
You are an expert in writing database language. You can write a corresponding 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": "How many total documents are recorded in the system?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM government_services.documents;",
"sql": null
},
{
"role": "user",
"content": "Show me the count of documents for each ve... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, citizen_id text,... | [
{
"role": "user",
"content": "List the names of service locations that have had more than 10 appointments with a status of 'Cancelled'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T2.location_name FROM government_services.appointments AS T1 JOIN government_services.service_loc... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Show me all patients who have scheduled appointments with doctors specializing in Cardiology, along with their appointment times and the doctors' full names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_name, p.last_name, a.ap... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id.text, first_name.text, last_name.text, date_of_birt... | [
{
"role": "user",
"content": "Show me a list of all doctors who have made at least one diagnosis along with the total number of diagnoses they have made.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.doctor_id, d.first_name, d.last_name, COUNT(di.diagnosis_id) AS diagnosis_cou... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Index 'aircraft_models'. Mapping: { properties: { model_id: { type: 'keyword' }, model_name: { ty... | [
{
"role": "user",
"content": "Can you help me retrieve a list of all aircraft builds for a specific model, including their assembly line details and current status?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ab.build_id, ab.serial_number, ab.model_id, ab.current_status, al.li... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.agents ( agent_id.text, first_name.text, last_name.text, agency_name.text,... | [
{
"role": "user",
"content": "Which five license states have the highest count of active agents? Return the license_state and agent_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT license_state,\n COUNT(*) AS agent_count\nFROM insurance.agents\nWHERE status = 'Active'... |
You are an expert in writing database language. You can write a corresponding 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": "Show all patients along with the names of all insurance plans they are enrolled in, plus the insurance provider for each plan.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.patient_id, p.first_name, p.last_name, ip.plan_name, ip.insurance_provider... |
You are an expert in writing database language. You can write a corresponding 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": "How many games are there per platform, and what is the earliest release_date for each platform?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT platform,\n COUNT(*) AS game_count,\n MIN(release_date) AS earliest_release\nFROM gaming_techno... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "Show the count of citizens grouped by their verification status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT is_verified, COUNT(*) FROM government_services.citizens GROUP BY is_verified;",
"sql": null
},
{
"role": "user",
"content"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms ( room_id text, property_id text, room_number text, roo... | [
{
"role": "user",
"content": "Calculate the total price for all service orders, grouped by their status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, SUM(total_price) AS total_revenue FROM hospitality_technology.service_orders GROUP 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 gaming_technology.player_achievements (
player_achievement_id uuid NOT NULL DEFA... | [
{
"role": "user",
"content": "For each player, count the total number of achievements they've unlocked.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id,\n COUNT(*) AS total_achievements\nFROM gaming_technology.player_achievements\nGROUP BY player_id;",
"sql": n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE erc1155_approval_for_all (
block_number bigint NOT NULL, -- Block number contain... | [
{
"role": "user",
"content": "Show me all ERC1155 NFTs that were minted by wallet address '0x9876543210abcdef' on Ethereum, along with their contract address and token ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, token_id FROM nft_metadata WHERE blockchain... |
You are an expert in writing database language. You can write a corresponding 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": "Find users with push_notifications_enabled set to false who have unread notifications. Show their username and the count of unread notifications.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(n.notification_id) AS unread_count FROM... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.service_locations ( location_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "List the number of appointments for each booking method.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n a.booking_method,\n COUNT(*) AS appointment_count\nFROM appointments a\nGROUP BY a.booking_method;",
"sql": null
},
{
"role": "use... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwo... | [
{
"role": "user",
"content": "Show the number of users registered each month for 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n date_trunc('month', created_at) AS month,\n COUNT(*) AS user_count\nFROM trading_platform.users\nWHERE created_at >= '2024-01-01'\n AND creat... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.comments ( comment_id.text, post_id.text, user_id.text, parent_comment_... | [
{
"role": "user",
"content": "Can you list all replies along with their parent comment content for post_id 'P100'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT reply.comment_id AS reply_id, parent.content AS parent_content, reply.content AS reply_content FROM comments AS reply ... |
You are an expert in writing database language. You can write a corresponding 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": "Find all service locations in the city of 'Albany' that are accessible. Show their IDs, names, and contact phone numbers along with their address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, location_name, contact_phone, address FROM ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "List the license plate, make, and current status of all vehicles acquired after January 1, 2021.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT license_plate, make, status \nFROM transportation.vehicles\nWHERE acquisition_date > '2021-01-01';",
"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.employees ( employee_id character varying(64) NOT NULL, agency_i... | [
{
"role": "user",
"content": "Show the first name and last name of employees who have a manager, along with the first and last name of their manager.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name , T1.last_name , T2.first_name , T2.last_name FROM employees AS T1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.