system stringlengths 315 8.06k | conversations listlengths 2 48 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.game_sessions ( session_id uuid PRIMARY KEY, player_id uuid, game_... | [
{
"role": "user",
"content": "For each server, what is the earliest and latest start time of its sessions?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT server_id, MIN(start_time), MAX(start_time) FROM gaming_technology.game_sessions GROUP BY server_id;",
"sql": null
},
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id text, token_name text, token_symbol text, token_address t... | [
{
"role": "user",
"content": "Which exchange holds the largest total USD value of the token with the highest 24h price increase in the 'AI' narrative, and what is that value?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT ctb.exchange, SUM(ctb.usd_value) AS total_usd_value\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 financial_services.customers ( customer_id character varying(64) NOT NULL, first_nam... | [
{
"role": "user",
"content": "List all customers and the total amount they have traded, showing their full name, email, and the total across all their trades. Join customers to their accounts, then to trades.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.customer_id, c.first_n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE blockchain.blocks ( block_id text, previous_block_id text, timestamp timestamp, nonc... | [
{
"role": "user",
"content": "List the block_id, timestamp, and the total amount of transactions for each block, along with the sender and receiver addresses for each transaction that occurred on April 10th, 2023.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT b.block_id, b.times... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch... | [
{
"role": "user",
"content": "Show me the top 5 ERC20 tokens with the highest total supply, along with their names and contract addresses, but only include tokens where the price is greater than $0.1.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tm.name, tm.contract_address, tm... |
You are an expert in writing database language. You can write a corresponding 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 DEFAULT ... | [
{
"role": "user",
"content": "Show me how many achievements each player has unlocked.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT player_id,\n COUNT(*) AS total_unlocked\nFROM gaming_technology.player_achievements\nGROUP BY player_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 project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_nam... | [
{
"role": "user",
"content": "For each chain in the smart money token inflow data, calculate the total number of addresses involved in buy transactions and the total number of addresses involved in sell transactions. Display the chain, total buy addresses, and total sell addresses.",
"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.appointments ( appointment_id character varying(64) NOT NULL, client_... | [
{
"role": "user",
"content": "Show me the appointment ID, start time, and subject for all appointments scheduled with lawyer 'lawyer123'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT appointment_id, start_time, subject FROM legal_services.appointments WHERE lawyer_id = 'lawyer1... |
You are an expert in writing database language. You can write a corresponding 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": "I want to see all time entries where the description contains the word 'draft' and that have not been billed yet.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT *\nFROM legal_services.time_entries\nWHERE description ILIKE '%draft%'\n AND is_billed =... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id text, national_id_number text, first_name ... | [
{
"role": "user",
"content": "Find pairs of citizens who have the same last name but different national_id_number.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c1.citizen_id AS citizen_id_1, c1.first_name AS first_name_1, c1.last_name AS last_name_1, c1.national_id_number AS 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.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti... | [
{
"role": "user",
"content": "List the claim ID, incident date, estimated loss, and the first and last name of the customer for all claims with an estimated loss greater than 5000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.claim_id, T1.incident_date, T1.estimated_loss, T2... |
You are an expert in writing database language. You can write a corresponding 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 hospitality_technology.properties ( property_id text, property_name text, address_li... | [
{
"role": "user",
"content": "Show me all service orders for spa services in the last month, including the guest name and staff who delivered the service.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT so.order_id, g.first_name, g.last_name, s.service_name, st.first_name AS staff... |
You are an expert in writing database language. You can write a corresponding 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, claim_id cha... | [
{
"role": "user",
"content": "Show the document ID, claim ID, and file name for all documents with a MIME type starting with 'image/'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT document_id, claim_id, file_name FROM insurance.claim_documents WHERE mime_type LIKE 'image/%';",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
Index 'suppliers'. Mapping: { properties: { supplier_id: { type: 'keyword' }, supplier_name: { ty... | [
{
"role": "user",
"content": "특정 품질 등급 이상의 공급업체를 조회하고 싶습니다. 품질 등급, 공급업체 이름, 국가를 포함해 주세요.",
"sql": null
},
{
"role": "assistant",
"content": "GET suppliers/_search\n{\n \"query\": {\n \"range\": {\n \"quality_rating\": {\n \"gte\": 4.0\n }\n }\n },\n \"_source\": [\"... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.loans (
loan_id character varying(64) NOT NULL, -- unique ide... | [
{
"role": "user",
"content": "Retrieve all pairs of loans for the same account where both loans are active and have different loan types. Show account_id, loan_id as loan_a, loan_type as type_a, loan_id as loan_b, and loan_type as type_b.",
"sql": null
},
{
"role": "assistant",
"content": "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 all appointments along with their subject and start time for lawyers specializing in 'Criminal Law'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.subject, T1.start_time FROM legal_services.appointments AS T1 JOIN legal_services.lawyers AS 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
// Use Hashes for platform details. Key format: platform:<platform_id>
// HSET platform:plat_123 ... | [
{
"role": "user",
"content": "Can you help me retrieve the details of all schedules for a specific train with train_id 'train_789', including the route and stops information?",
"sql": null
},
{
"role": "assistant",
"content": "HGETALL train:train_789\nSMEMBERS schedule:sched_*:train:train_78... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE insurance.policies ( policy_id text, customer_id text, product_id text, agent_id tex... | [
{
"role": "user",
"content": "Retrieve the policy_number, start_date, end_date, premium_amount, and corresponding product_name for policies with a coverage_limit greater than 500000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.policy_number, p.start_date, p.end_date, p.premi... |
You are an expert in writing database language. You can write a corresponding 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": "Find all pairs of tokens that have the same contract_address but different token_symbols. Show both token_ids, each token's symbol, and the shared contract_address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.token_id AS token_id_1, t2.token_id... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE token_basic_info ( coin_id character varying(100) NOT NULL, token_name character var... | [
{
"role": "user",
"content": "List all tokens with a price below $1 and a 24-hour trading volume over $5 million.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_name, token_symbol, price, total_volume FROM token_basic_info WHERE price < 1 AND total_volume::numeric > 5000000... |
You are an expert in writing database language. You can write a corresponding 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": "Show a count of drivers per status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS driver_count\nFROM transportation.drivers\nGROUP BY status;",
"sql": null
},
{
"role": "user",
"content": "Can you also list the ea... |
You are an expert in writing database language. You can write a corresponding 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": "For each location, what is the average appointment duration? Show location_id and the average duration.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, AVG(duration_minutes) FROM healthcare.appointments GROUP BY location_id;",
"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 legal_services.law_firms ( firm_id.text, firm_name.text, address.text, phone.text, w... | [
{
"role": "user",
"content": "Find all pairs of law firms founded in the same year, showing both firm names and the shared founding year.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT f1.firm_name AS firm1, f2.firm_name AS firm2, EXTRACT(YEAR FROM f1.founded_date) AS founding_ye... |
You are an expert in writing database language. You can write a corresponding 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 usernames and email addresses of users who have published posts with media_type 'video', along with the creation time of each post.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, u.email, p.created_at\nFROM social_media.users u\n... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3