system stringlengths 315 11.5k | conversations listlengths 2 8 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.token_transfers (
transfer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Find pairs of distinct token transfers that occurred in the same transaction and were initiated by the same sender address. List the transaction ID, the common sender address, and both transfer IDs.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n 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 hospitality_technology.services ( service_id text, property_id text, service_name te... | [
{
"role": "user",
"content": "Can you give me the number of available services and their average price for each department?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT department, COUNT(*) AS available_services_count, AVG(price) AS average_price\nFROM hospitality_technology.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 token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, t... | [
{
"role": "user",
"content": "List all ERC721 collections with their names, symbols, and floor prices where the floor price is greater than 0.1 ETH.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT name, symbol, floor_price FROM nft_collections WHERE erc_type = 'ERC721' AND CAST(fl... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, post_id text, user_id text, par... | [
{
"role": "user",
"content": "Which users have commented on posts created by the users they follow? Please show the commenter user_ids and the followed user_ids.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT c.user_id AS commenter_user_id, f.following_user_id AS followe... |
You are an expert in writing database language. You can write a corresponding 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 the number of followers for each user who is following others, listing their user_id and follower count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT following_user_id AS user_id, COUNT(follower_user_id) AS follower_count\nFROM social_media.fo... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.drivers ( driver_id.text, employee_id.text, first_name.text, last_nam... | [
{
"role": "user",
"content": "Calculate the total number of drivers for each status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status,\n COUNT(*) AS driver_count\nFROM transportation.drivers\nGROUP BY status;",
"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 healthcare.appointments ( appointment_id text, patient_id text, doctor_id text, appo... | [
{
"role": "user",
"content": "List each patient's active insurance policy and the number of prescriptions they have during that policy. Show patient_id, plan_id, policy_number, and prescription_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pi.patient_id, pi.plan_id, pi.po... |
You are an expert in writing database language. You can write a corresponding 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 number of trips and the average passenger count per vehicle.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT v.vehicle_id, COUNT(t.trip_id) AS trip_count, AVG(t.passenger_count) AS avg_passenger_count\nFROM transportation.vehicles v\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 financial_services.securities (
security_id character varying(64) NOT NULL, -- u... | [
{
"role": "user",
"content": "List the ticker_symbol and average close price for all securities of type 'ETF'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.ticker_symbol, AVG(md.close_price) AS avg_close_price\nFROM financial_services.securities s\nJOIN financial_services.mar... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name... | [
{
"role": "user",
"content": "List all job titles of employees who work in the 'Finance' department.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT job_title\nFROM government_services.employees\nWHERE department = 'Finance';",
"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.notifications ( notification_id text PRIMARY KEY, citizen_id tex... | [
{
"role": "user",
"content": "For each notification, list its notification_id, message_subject, and the message_subject of the notification it relates to (assuming related_entity_type = 'notification').",
"sql": null
},
{
"role": "assistant",
"content": "SELECT n.notification_id,\n n.m... |
You are an expert in writing database language. You can write a corresponding 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 agents who have a commission rate above 0.1, showing their full names and agency names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agent_id, first_name, last_name, agency_name, commission_rate FROM insurance.agents WHERE commission_rate ... |
You are an expert in writing database language. You can write a corresponding 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 security sector, what is the average volume recorded in the market data?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T2.sector, AVG(T1.volume) FROM financial_services.market_data AS T1 JOIN financial_services.securities AS T2 ON T1.securi... |
You are an expert in writing database language. You can write a corresponding 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.patient_insurance ( patient_insurance_id.text, patient_id.text, plan_id.t... | [
{
"role": "user",
"content": "How many insurance policies does each subscriber have? Please display the subscriber name and policy count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT subscriber_name, COUNT(*) AS policy_count FROM healthcare.patient_insurance GROUP BY subscriber... |
You are an expert in writing database language. You can write a corresponding 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": "Which room types have a base rate above 250, and what are their property names and maximum occupancy?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT rt.room_type_id, rt.type_name, p.property_name, rt.base_rate, rt.max_occupancy\nFROM hospitality_tech... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, customer_id text, product_id text, ... | [
{
"role": "user",
"content": "List policy pairs for the same customer where one policy was cancelled and another active policy started within 30 days after the cancellation. Show customer_id, cancelled policy_number, cancellation_date, active policy_number, start_date.",
"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 government_services.citizens ( citizen_id text PRIMARY KEY, national_id_number text,... | [
{
"role": "user",
"content": "List the city and the count of accessible and inaccessible service locations separately. Return city, accessible_count, and inaccessible_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT city,\n SUM(CASE WHEN is_accessible THEN 1 ELSE 0 END... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text PRIMARY KEY, route_number text, description te... | [
{
"role": "user",
"content": "Find all pairs of origin and destination cities, along with their route_number and distance, where the estimated duration is less than 90 minutes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_number, origin_location_id, destination_location_i... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id.uuid, username.text, email.text, password_hash... | [
{
"role": "user",
"content": "List each game's title along with the name of the developer and the total number of servers currently hosting that game.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, g.developer_id, COUNT(s.server_id) AS total_servers\nFROM gaming_technolo... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.messages ( message_id character varying(64) NOT NULL, conversation_id c... | [
{
"role": "user",
"content": "List `user_id` and `conversation_id` for participants who are in conversations where there is at least one message sent by *another* user that they have not read.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT T1.user_id, T1.conversation_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 healthcare.medical_records (
record_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List the record ID, record date, patient ID, and chief complaint for medical records belonging to patients whose last name is 'Smith'. Also include the patient's last name in the results.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT mr.record_id, m... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name... | [
{
"role": "user",
"content": "List the name of each agency and the number of appointments associated with services from that agency.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.agency_name, COUNT(T2.appointment_id) FROM agencies AS T1 JOIN appointments AS T2 ON T1.agency_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.hashtags ( hashtag_id character varying(64) NOT NULL, tag_name characte... | [
{
"role": "user",
"content": "List all pairs of hashtags that were created on the same date. Show both tag names and the creation date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.tag_name AS tag1, b.tag_name AS tag2, a.created_at::date AS created_date\nFROM social_media.has... |
You are an expert in writing database language. You can write a corresponding 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 bigint, security_id text, data_timest... | [
{
"role": "user",
"content": "I need to compare consecutive daily close_prices for each security to find when the close_price increased compared to the previous day.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.security_id, b.data_timestamp AS prev_date, b.close_price AS prev... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text... | [
{
"role": "user",
"content": "List all insurance plans along with their provider, plan type, and the contact phone number. Also, for each plan, show how many doctors have their hospital affiliation ID matching the plan ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ip.plan_id... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.trips (
trip_id character varying(64) NOT NULL, -- unique identi... | [
{
"role": "user",
"content": "Retrieve trip_id and passenger full names for all trips where the passenger record was created before the scheduled departure.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t.trip_id, p.first_name || ' ' || p.last_name AS passenger_name\nFROM transp... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id text, address text, abi text, bytecode text, deployer_a... | [
{
"role": "user",
"content": "Which user has created the most tokens? Please show the username and the number of tokens they have created.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(*) AS token_count\nFROM web3.tokens t\nJOIN web3.contracts c ON t.contract_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.fuel_logs ( fuel_log_id.text, vehicle_id.text, trip_id.text, log_time... | [
{
"role": "user",
"content": "List all pairs of fuel log entries for the same vehicle that occurred more than 7 days apart, showing vehicle_id, first_log_id, second_log_id, and the time difference in days.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f1.vehicle_id,\n f1.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 government_services.services ( service_id.text, agency_id.text, service_name.text, d... | [
{
"role": "user",
"content": "Find pairs of active services from the same agency where one service's average processing time is longer than the other's. Display the agency_id, the slower service name with its processing time, and the faster service name with its processing time.",
"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.users ( user_id text, username text, email text, password_hash text, fu... | [
{
"role": "user",
"content": "Show me all users along with the total number of unique hashtags used in their posts.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.username, COUNT(DISTINCT ph.hashtag_id) AS unique_hashtag_count\nFROM social_media.users u\nLEFT JOIN so... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,... | [
{
"role": "user",
"content": "特定の組み立てラインに割り当てられた従業員とそのラインの手順情報を取得したいです。従業員ID、名前、職種と手順名、手順番号を含めてください。",
"sql": null
},
{
"role": "assistant",
"content": "db.employees.aggregate([\n { $match: { assigned_line_id: '<specific_line_id>' } },\n { $lookup: {\n from: 'assembly_steps',\n ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.cases ( case_id.text, case_number.text, case_name.text, client_id.tex... | [
{
"role": "user",
"content": "List all appointments, including their subject and start time, along with the name and status of the case they are linked to.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.subject, T1.start_time, T2.case_name, T2.status FROM appointments AS T1 JO... |
You are an expert in writing database language. You can write a corresponding 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": "How many comments does each post have? Return post_id and comment_count for posts with more than 5 comments.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT post_id,\n COUNT(*) AS comment_count\nFROM social_media.comments\nGROUP BY post_id\nHAVI... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.transactions ( transaction_id character varying(64) NOT NULL, from_address char... | [
{
"role": "user",
"content": "Show the top 5 transactions with the highest number of token transfers, along with their Ethereum value. Include transaction_id, token_transfer_count, and ether_value.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n tt.transaction_id,\n COUNT(tt.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 government_services.service_locations ( location_id text PRIMARY KEY, agency_id text... | [
{
"role": "user",
"content": "Get the number of service locations per state.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT state, COUNT(*) AS location_count\nFROM service_locations\nGROUP BY state;",
"sql": null
},
{
"role": "user",
"content": "Now only include 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 financial_services.accounts ( account_id.text, customer_id.text, account_number.text... | [
{
"role": "user",
"content": "List each security’s ticker symbol and the total number of trades executed for it, along with the sum of quantities traded.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.ticker_symbol, COUNT(t.trade_id) AS total_trades, SUM(t.quantity) AS total_qu... |
You are an expert in writing database language. You can write a corresponding 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": "Retrieve the product_id, product_name, base_premium, and created_at for all active insurance products with a base_premium greater than 1000, ordered by base_premium descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n product_id,\n product_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id text, firm_name text, address text, phone text, w... | [
{
"role": "user",
"content": "List all billable but unbilled time entries including entry_id, lawyer_id, case_id, date_worked, hours_spent, and billing_rate.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT entry_id, lawyer_id, case_id, date_worked, hours_spent, billing_rate\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 government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "How many citizens are marked as not verified?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM government_services.citizens WHERE is_verified = 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 legal_services.time_entries (
entry_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Calculate the total billable hours spent by each lawyer for entries in March 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT lawyer_id,\n SUM(hours_spent) AS total_hours\nFROM legal_services.time_entries\nWHERE is_billable = TRUE\n AND da... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produ... | [
{
"role": "user",
"content": "Show me product_id, product_name, and base_premium for products created after '2023-01-01'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_id,\n product_name,\n base_premium\nFROM insurance.insurance_products\nWHERE created_at > '... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.posts ( post_id text PRIMARY KEY, user_id text, content text, media_url... | [
{
"role": "user",
"content": "List all posts where the content mentions 'meeting'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT post_id, user_id, content, created_at FROM social_media.posts WHERE content LIKE '%meeting%'",
"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 legal_services.time_entries (
entry_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me the total number of time entries for each case.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT case_id, COUNT(*) AS entry_count\nFROM legal_services.time_entries\nGROUP BY case_id;",
"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 government_services.agencies ( agency_id text, agency_name text, jurisdiction_level ... | [
{
"role": "user",
"content": "Which agencies offer services in the 'Social Assistance' category? Show the agency name and the service name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agency_name, s.service_name\nFROM government_services.services s\nJOIN government_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 token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var... | [
{
"role": "user",
"content": "Show the top 3 tokens on Polygon with the greatest positive price change over the last 6 hours, including their symbol, price, 6h change, and the number of smart money buy addresses in the last 24h.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tdi.... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.players ( player_id.uuid, username.text, email.text, password_hash... | [
{
"role": "user",
"content": "For each player, show their player_id and the number of unique games they have played sessions on.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id, COUNT(DISTINCT game_id) AS unique_games\nFROM gaming_technology.game_sessions\nGROUP BY playe... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.documents ( document_id text, case_id text, document_name text, docum... | [
{
"role": "user",
"content": "Show the latest version number of each document_name for every case.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT case_id,\n document_name,\n MAX(version) AS latest_version\nFROM legal_services.documents\nGROUP BY case_id, document_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 manufacturing.materials (
material_id character varying(64) NOT NULL, -- unique... | [
{
"role": "user",
"content": "特定の材料を使用しているコンポーネントの組み立て手順を確認したいです。材料IDと材料名、組み立て手順のステップ名と説明を含めてください。",
"sql": null
},
{
"role": "assistant",
"content": "SELECT m.material_id, m.material_name, s.step_name, s.description\nFROM manufacturing.materials m\nJOIN manufacturing.assembly_steps s ON m.m... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.achievements ( achievement_id uuid, game_id uuid, name text, descr... | [
{
"role": "user",
"content": "How many visible achievements are there per game, and what is the average point value of these achievements?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT game_id, COUNT(*) AS visible_count, AVG(points) AS avg_points\nFROM gaming_technology.achievem... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id character varying(32) NOT NULL, -- fundraising reco... | [
{
"role": "user",
"content": "List all tokens held by CEX addresses, showing the token symbol, name, current price, and the total USD value held by all CEXes for that token.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.token_symbol, T1.token_name, T1.price, SUM(T2.usd_value)... |
You are an expert in writing database language. You can write a corresponding 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": "List each property with the count of rooms that are currently marked as 'Occupied', including the property_name and occupied_count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name, COUNT(r.room_id) AS occupied_count\nFROM properties p\... |
You are an expert in writing database language. You can write a corresponding 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": "Find pairs of servers that are currently 'online' and share the same game_id, listing their server names and the shared game_id.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.server_name AS server1_name, s2.server_name AS server2_name, s1.game_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 government_services.documents ( document_id.text, application_id.text, citizen_id.te... | [
{
"role": "user",
"content": "For each document verified by an employee, list the document ID, the name of the verifying employee, and the name of the agency the employee belongs to.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.document_id, T2.first_name, T2.last_name, T3.ag... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.transactions ( transaction_id text, from_address text, to_address text, value n... | [
{
"role": "user",
"content": "For each transaction, find the next transaction by the same sender. Show the original transaction_id as current_tx, the next transaction_id as next_tx, from_address, and the time difference in minutes between them.",
"sql": null
},
{
"role": "assistant",
"conten... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash text,... | [
{
"role": "user",
"content": "List all ERC20 tokens from the `token_metas` table that have a total supply greater than 1 followed by 21 zeros. Show their contract address, symbol, name, and total supply.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT contract_address, symbol, 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 hospitality_technology.staff ( staff_id text PRIMARY KEY, property_id text, first_na... | [
{
"role": "user",
"content": "List staff members who were hired in the last calendar year, showing their full name, position, and hire date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, position, hire_date FROM hospitality_technology.staff WHERE hire_date... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.customers (
customer_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "I need to find, for each active agent, the number of active policies they have sold and the average premium_amount of those active policies.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id, a.first_name || ' ' || a.last_name AS agent_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.cases ( case_id text, case_number text, case_name text, client_id tex... | [
{
"role": "user",
"content": "Find all cases that were closed in the year 2022, showing their case name, case number, and date closed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT case_name, case_number, date_closed FROM legal_services.cases WHERE date_closed >= '2022-01-01' AN... |
You are an expert in writing database language. You can write a corresponding 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": "I want a list of all users, showing for each user their user_id, username, KYC status, and the date their account was created.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.user_id, u.username, k.status AS kyc_status, u.created_at\nFROM trading_pl... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.premium_payments ( payment_id character varying(64) NOT NULL, policy_id ch... | [
{
"role": "user",
"content": "Show me all premium payments made by customer with ID 'CUST789'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT * FROM insurance.premium_payments WHERE customer_id = 'CUST789';",
"sql": null
},
{
"role": "user",
"content": "From those... |
You are an expert in writing database language. You can write a corresponding 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 PRIMARY KEY, citizen_id text,... | [
{
"role": "user",
"content": "Find all applications that were submitted in 2023 but received a decision ('Approved' or 'Rejected') in 2024. List the application ID, submitted date, decision date, and status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT application_id, submitted... |
You are an expert in writing database language. You can write a corresponding 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": "Show me all policy beneficiaries who were added in the last 6 months, along with their full names and relationship to the policyholder.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT beneficiary_id, policy_id, first_name, last_name, relationship, per... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.law_firms ( firm_id.text, firm_name.text, address.text, phone.text, w... | [
{
"role": "user",
"content": "List all law firms that do not have a website registered, including their firm name and phone.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT firm_name, phone\nFROM legal_services.law_firms\nWHERE website IS NULL OR website = '';",
"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, username text, email text, password_hash... | [
{
"role": "user",
"content": "List all game titles and corresponding server names for servers that are located in the same region as 'us-central-1'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT g.title, s.server_name\nFROM gaming_technology.servers s\nJOIN gaming_technology.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 government_services.citizens ( citizen_id.text, national_id_number.text, first_name.... | [
{
"role": "user",
"content": "Show each employee's first and last name along with the number of appointments they have scheduled in March 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, COUNT(ap.appointment_id) AS appointment_count\nFROM government... |
You are an expert in writing database language. You can write a corresponding 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": "Find appointments and prescriptions associated with the same patient and doctor. Show the appointment ID, prescription ID, patient ID, and doctor ID.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.appointment_id , T2.prescription_id , T1.patient... |
You are an expert in writing database language. You can write a corresponding 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.text, token_name.text, token_symbol.text, token_address.t... | [
{
"role": "user",
"content": "List the top 5 tokens by price_change_percentage_7d, showing token_symbol, narrative, and price_change_percentage_7d.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, narrative, price_change_percentage_7d\nFROM token_basic_info\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 financial_services.securities ( security_id text, ticker_symbol text, isin_code text... | [
{
"role": "user",
"content": "List pairs of securities that belong to the same sector but have different currencies.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.sector, a.ticker_symbol AS symbol_a, a.currency AS currency_a, b.ticker_symbol AS symbol_b, b.currency AS currency... |
You are an expert in writing database language. You can write a corresponding 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": "Retrieve the title and release_date of all games on the 'PC' platform.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT title, release_date\nFROM gaming_technology.games\nWHERE platform = 'PC';",
"sql": null
},
{
"role": "user",
"conten... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.service_locations ( location_id text, agency_id text, location_n... | [
{
"role": "user",
"content": "How many service locations are there for each agency? List the agency ID and the count of locations.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agency_id , count(*) FROM government_services.service_locations GROUP BY 1",
"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.cases ( case_id.text, case_number.text, case_name.text, client_id.tex... | [
{
"role": "user",
"content": "Show me all time entries, including the case name they are associated with.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.*, T2.case_name FROM time_entries AS T1 JOIN cases AS T2 ON T1.case_id = T2.case_id",
"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 web3.token_transfers ( transfer_id text, token_id text, from_address text, to_addres... | [
{
"role": "user",
"content": "Which addresses have both sent and received tokens? List them.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT t1.from_address FROM web3.token_transfers t1 INNER JOIN web3.token_transfers t2 ON t1.from_address = t2.to_address;",
"sql": nu... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Show me the full names of all patients who have received a diagnosis for 'hypertension', along with the appointment time and the doctor's full name for each related appointment.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.first_name, p.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 web3.tokens (
token_id character varying(64) NOT NULL, -- unique identifier for... | [
{
"role": "user",
"content": "List all tokens with a total supply greater than 1,000,000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_id, token_name, token_symbol, contract_address, total_supply\nFROM web3.tokens\nWHERE total_supply > 1000000;",
"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.vehicles ( vehicle_id character varying(64) NOT NULL, license_plate c... | [
{
"role": "user",
"content": "Which vehicles have a total maintenance cost exceeding 10000 across all their maintenance logs?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT vehicle_id, SUM(cost) AS total_maintenance_cost FROM transportation.maintenance_logs GROUP BY vehicle_id HA... |
You are an expert in writing database language. You can write a corresponding 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 each property along with the total revenue generated from all delivered service orders, including the property name and total revenue.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_id, p.property_name, SUM(so.total_price) AS total_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 gaming_technology.games ( game_id uuid, title text, developer_id uuid, publisher_id ... | [
{
"role": "user",
"content": "Can you provide a list of all players who have acquired at least one item, along with the item name, its type, and the title of the game that item belongs to?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT pi.player_id, items.item_name, items.item_ty... |
You are an expert in writing database language. You can write a corresponding 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": "Show the top 5 largest documents by file size, including document_id, claim_id, file_name, and file_size_bytes.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id,\n claim_id,\n file_name,\n file_size_bytes\nFROM insurance.c... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.rooms (
room_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "List all room numbers with their room type name and property name for rooms that have a Jacuzzi feature.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT r.room_number, rt.type_name, p.property_name\nFROM hospitality_technology.rooms r\nJOIN hospitalit... |
You are an expert in writing database language. You can write a corresponding 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": "Find all agents hired after '2021-01-01', including their first_name, last_name, hire_date, and their manager's full name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.agent_id,\n a.first_name,\n a.last_name,\n a.hire_date,\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
// PUT /stations
{
"mappings": {
"properties": {
"station_id": { "type": "keyword" },... | [
{
"role": "user",
"content": "Can you provide the total capacity of all train cars for a specific train with train_id 'TR789'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SUM(capacity) AS total_capacity\nFROM train_cars\nWHERE train_id = 'TR789';",
"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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character... | [
{
"role": "user",
"content": "I want to see pairs of fundraising rounds for projects that have at least two rounds. Please list project_name, earlier_round, earlier_investment, later_round, and later_investment.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n earlier.project_na... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.insurance_products ( product_id.text, product_name.text, product_type.text... | [
{
"role": "user",
"content": "Retrieve the average base premium of insurance products for each product_type, including only types that have more than 5 products.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_type, AVG(base_premium) AS avg_premium\nFROM insurance.insuranc... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE project_fundraising_record ( id text, project_id text, project_name text, rounds_nam... | [
{
"role": "user",
"content": "For each narrative in token_basic_info, calculate the total net_flow and average ROI from smart_money_token_performance. List narrative, total_net_flow, avg_roi, ordered by total_net_flow descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tbi... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers (
lawyer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "List all partners who have provided a phone number, showing their full name and email.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name, last_name, email FROM legal_services.lawyers WHERE is_partner = TRUE AND phone IS NOT NULL;",
"sql":... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patients ( patient_id.text, first_name.text, last_name.text, date_of_birt... | [
{
"role": "user",
"content": "List all pairs of patients who registered on the same day. Show patient1_id, patient1_name, patient2_id, patient2_name, and the shared registration date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p1.patient_id AS patient1_id, p1.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 healthcare.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ... | [
{
"role": "user",
"content": "List all insurance providers along with the total number of plans they offer.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT insurance_provider, COUNT(*) AS plan_count\nFROM healthcare.insurance_plans\nGROUP BY insurance_provider;",
"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.clients ( client_id character varying(64) NOT NULL, first_name charac... | [
{
"role": "user",
"content": "Show all cases with at least one billed and billable time entry, including case number, case name, total billed amount, and billed hours.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT cs.case_number, cs.case_name, SUM(te.hours_spent * te.billing_rat... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, ci... | [
{
"role": "user",
"content": "List the reference number and status for all applications, including the registration date of the citizen who submitted it.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT a.reference_number, a.status, c.registration_date FROM government_services.appl... |
You are an expert in writing database language. You can write 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: :Station
// Properties:
// station_id: String (Constraint: UNIQUE)
// station_... | [
{
"role": "user",
"content": "Can you help me find all staff members based at a specific station with station_id 'station_xyz', including the station details and platform information they are associated with?",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (stf:Staff)-[:BASED_AT]->... |
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 detailed repair history of the equipment used by the staff with staff_id 'STAFF123' during maintenance tasks?",
"sql": null
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide information on the detailed repair history of equipment 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 trading_platform.users ( user_id character varying(64) NOT NULL, username character ... | [
{
"role": "user",
"content": "List the name and symbol for all assets that do not have a corresponding entry with the key 'website' in the metadata table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.name , T1.symbol FROM trading_platform.assets AS T1 LEFT JOIN trading_platf... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers (
lawyer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Find all invoices with status 'Paid' where the total amount is between 2000 and 5000. Show invoice number, total amount, issue date, and due date. Sort the results by issue date descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_numbe... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.customers ( customer_id text PRIMARY KEY, first_name text, last_n... | [
{
"role": "user",
"content": "List all securities (security_id, ticker_symbol, security_name) that are traded on the NASDAQ exchange (exchange = 'NASDAQ') and belong to the 'Technology' sector.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT security_id, ticker_symbol, security_na... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.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.player_inventory ( inventory_id uuid, player_id uuid, item_id uuid... | [
{
"role": "user",
"content": "List each unique item ID and the total number of inventory entries for that item.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT item_id, COUNT(*) AS entry_count FROM gaming_technology.player_inventory GROUP BY item_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 smart_money_token_inflow ( token_address character varying(100) NOT NULL, -- the tok... | [
{
"role": "user",
"content": "Which token symbols have the highest number of addresses buying them on the Ethereum chain? Show the top 3 symbols, their total address_amount, and narrative.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, narrative, SUM(address_amount)... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.transactions ( transaction_id character varying(64) NOT NULL, from_address char... | [
{
"role": "user",
"content": "Find the top 5 transactions with the highest gas prices that were successful, including the from_address, to_address, and block_number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT from_address, to_address, block_number, gas_price FROM web3.transac... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.insurance_products ( product_id text PRIMARY KEY, product_name text, produ... | [
{
"role": "user",
"content": "List all insurance products along with their type and base premium. Also, show whether each product is active.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT product_id, product_name, product_type, base_premium, is_active FROM insurance.insurance_pro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.