prompt listlengths 2 2 | completion listlengths 1 1 | chat_template_kwargs dict |
|---|---|---|
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT org_name, industry, country_code FROM organizations WHERE is_active = 1 ORDER BY org_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT tier_name, monthly_price_usd, max_users, api_rate_limit FROM subscription_tiers WHERE is_enterprise = 1 ORDER BY monthly_price_usd;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT event_type, event_count, occurred_at, metadata FROM usage_events ORDER BY occurred_at DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT o.org_name, st.tier_name, s.billing_cycle, s.status FROM subscriptions s JOIN organizations o ON s.org_id = o.org_id JOIN subscription_tiers st ON s.tier_id = st.tier_id WHERE s.status = 'active' AND o.is_active = 1 ORDER BY o.org_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT u.full_name, u.email, u.role, o.org_name, u.last_login_at FROM users u JOIN organizations o ON u.org_id = o.org_id WHERE u.last_login_at IS NOT NULL AND strftime('%Y-%m', REPLACE(u.last_login_at, '/', '-')) = '2024-06' AND u.is_active = 1 ORDER BY u.last_login_at DE... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT o.org_name, u.full_name, ue.event_type, ue.event_count, ue.occurred_at FROM usage_events ue JOIN subscriptions s ON ue.sub_id = s.sub_id JOIN organizations o ON s.org_id = o.org_id LEFT JOIN users u ON ue.user_id = u.user_id WHERE ue.occurred_at >= date((SELECT MAX(... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT o.org_name, COUNT(u.user_id) AS active_user_count FROM organizations o LEFT JOIN users u ON o.org_id = u.org_id AND u.is_active = 1 WHERE o.is_active = 1 GROUP BY o.org_id, o.org_name ORDER BY active_user_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT st.tier_name, SUM(ue.event_count) AS total_api_calls FROM usage_events ue JOIN subscriptions s ON ue.sub_id = s.sub_id JOIN subscription_tiers st ON s.tier_id = st.tier_id WHERE ue.event_type = 'api_call' AND strftime('%Y-%m', REPLACE(ue.occurred_at, '/', '-')) = (S... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT o.org_name, st.tier_name, st.api_rate_limit, monthly_usage.total_calls FROM organizations o JOIN subscriptions s ON o.org_id = s.org_id JOIN subscription_tiers st ON s.tier_id = st.tier_id JOIN (SELECT s2.org_id, SUM(ue.event_count) AS total_calls FROM usage_events ... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE organizations (\n org_id INTEGER PRIMARY KEY,\n org_name TEXT NOT NULL,\n industr... | [
{
"role": "assistant",
"content": "SELECT o.org_name, AVG(julianday(s.renewed_at) - julianday(s.started_at)) AS avg_days_to_renewal FROM organizations o JOIN subscriptions s ON o.org_id = s.org_id WHERE s.billing_cycle = 'annual' AND s.renewed_at IS NOT NULL GROUP BY o.org_id, o.org_name HAVING COUNT(s.sub_... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT full_name, membership_tier, join_date FROM members WHERE is_active = 1 AND join_date >= '2023-01-01' ORDER BY join_date DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT account_type, product_name, current_balance FROM accounts WHERE status = 'Active' ORDER BY current_balance DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT transaction_id, account_id, transaction_date, amount, description FROM transactions WHERE category = 'Loan Payment' AND transaction_date BETWEEN '2024-01-01' AND '2024-01-31' ORDER BY amount DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT m.full_name, m.email, COUNT(a.account_id) AS active_account_count FROM members m JOIN accounts a ON m.member_id = a.member_id WHERE m.is_active = 1 AND a.status = 'Active' GROUP BY m.member_id, m.full_name, m.email ORDER BY active_account_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT m.full_name, l.loan_purpose, l.original_amount, l.payments_remaining, a.current_balance FROM loans l JOIN accounts a ON l.account_id = a.account_id JOIN members m ON a.member_id = m.member_id WHERE l.loan_purpose != 'Revolving Credit' AND l.loan_purpose != 'Investme... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT bp.payee_name, bp.category, bp.last_paid_date FROM bill_payees bp JOIN members m ON bp.member_id = m.member_id WHERE m.full_name = 'Sarah J. Mitchell' AND bp.is_active = 1 ORDER BY bp.last_paid_date DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT m.full_name, SUM(t.amount) AS total_deposits FROM members m JOIN accounts a ON m.member_id = a.member_id JOIN transactions t ON a.account_id = t.account_id WHERE t.transaction_type = 'Deposit' AND t.transaction_date BETWEEN '2024-01-01' AND '2024-01-31' GROUP BY m.m... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT account_type, ROUND(AVG(interest_rate), 4) AS avg_interest_rate FROM accounts WHERE status = 'Active' AND interest_rate IS NOT NULL GROUP BY account_type ORDER BY avg_interest_rate DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT m.full_name, a.current_balance, l.original_amount, ROUND(a.current_balance / l.original_amount, 4) AS ltv_ratio FROM members m JOIN accounts a ON m.member_id = a.member_id JOIN loans l ON a.account_id = l.account_id WHERE a.account_type = 'Mortgage' AND l.original_a... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE members (\n member_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n date_of_b... | [
{
"role": "assistant",
"content": "SELECT m.membership_tier, COUNT(DISTINCT m.member_id) AS members_with_cc_debt FROM members m JOIN accounts a ON m.member_id = a.member_id WHERE m.is_active = 1 AND a.account_type = 'Credit Card' AND a.current_balance < 0 AND a.status = 'Active' GROUP BY m.membership_tier O... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE depots (\n depot_id INTEGER PRIMARY KEY,\n depot_code TEXT NOT NULL UNIQUE,\n dep... | [
{
"role": "assistant",
"content": "SELECT depot_code, depot_name, city, state FROM depots WHERE active_flag = 0;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE depots (\n depot_id INTEGER PRIMARY KEY,\n depot_code TEXT NOT NULL UNIQUE,\n dep... | [
{
"role": "assistant",
"content": "SELECT customer_code, company_name, credit_limit_usd FROM customers WHERE credit_limit_usd > 300000 ORDER BY credit_limit_usd DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE depots (\n depot_id INTEGER PRIMARY KEY,\n depot_code TEXT NOT NULL UNIQUE,\n dep... | [
{
"role": "assistant",
"content": "SELECT order_reference, order_date, order_status FROM transport_orders ORDER BY order_date DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE depots (\n depot_id INTEGER PRIMARY KEY,\n depot_code TEXT NOT NULL UNIQUE,\n dep... | [
{
"role": "assistant",
"content": "SELECT e.asset_tag, e.equipment_type, d.depot_code, d.city\nFROM equipment e\nJOIN depots d ON e.depot_id = d.depot_id\nWHERE e.status = 'AVAILABLE' AND e.equipment_type IN ('CHASSIS_40FT', 'CHASSIS_20FT');"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE depots (\n depot_id INTEGER PRIMARY KEY,\n depot_code TEXT NOT NULL UNIQUE,\n dep... | [
{
"role": "assistant",
"content": "SELECT SUM(freight_charge_usd) AS total_freight_revenue, AVG(fuel_surcharge_usd) AS avg_fuel_surcharge\nFROM transport_orders\nWHERE order_status = 'DELIVERED';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE depots (\n depot_id INTEGER PRIMARY KEY,\n depot_code TEXT NOT NULL UNIQUE,\n dep... | [
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS equipment_count\nFROM equipment\nGROUP BY status\nORDER BY equipment_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT emp_id, first_name, last_name, hire_date FROM employees WHERE termination_date IS NULL ORDER BY hire_date DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT title, salary_min, salary_max FROM job_roles WHERE is_exempt = 0 ORDER BY salary_min;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT leave_id, emp_id, leave_type, start_date, end_date FROM leave_requests WHERE status = 'Pending' ORDER BY start_date;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT e.emp_id, e.first_name || ' ' || e.last_name AS employee_name, d.dept_name, j.title FROM employees e JOIN departments d ON e.dept_id = d.dept_id JOIN job_roles j ON e.role_id = j.role_id ORDER BY d.dept_name, e.last_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT lr.leave_id, e.first_name || ' ' || e.last_name AS employee_name, lr.leave_type, lr.start_date, lr.end_date, a.first_name || ' ' || a.last_name AS approved_by_name FROM leave_requests lr JOIN employees e ON lr.emp_id = e.emp_id JOIN employees a ON lr.approved_by = a... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT pr.review_id, e.first_name || ' ' || e.last_name AS employee_name, d.dept_name, pr.rating, r.first_name || ' ' || r.last_name AS reviewer_name, pr.review_date FROM performance_reviews pr JOIN employees e ON pr.emp_id = e.emp_id JOIN departments d ON e.dept_id = d.de... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT d.dept_name, COUNT(e.emp_id) AS employee_count FROM departments d LEFT JOIN employees e ON d.dept_id = e.dept_id AND e.termination_date IS NULL GROUP BY d.dept_id, d.dept_name ORDER BY employee_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT d.dept_name, ROUND(AVG(pr.rating), 2) AS avg_rating, COUNT(pr.review_id) AS review_count FROM performance_reviews pr JOIN employees e ON pr.emp_id = e.emp_id JOIN departments d ON e.dept_id = d.dept_id WHERE strftime('%Y', REPLACE(pr.review_date, '/', '-')) = '2022'... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE departments (\n dept_id INTEGER PRIMARY KEY,\n dept_name TEXT NOT NULL,\n locatio... | [
{
"role": "assistant",
"content": "SELECT e.emp_id, e.first_name || ' ' || e.last_name AS employee_name, d.dept_name, j.title AS role_title, lr.start_date, lr.end_date FROM leave_requests lr JOIN employees e ON lr.emp_id = e.emp_id JOIN departments d ON e.dept_id = d.dept_id JOIN job_roles j ON e.role_id = ... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT expedition_id, trip_name, base_price, start_date FROM expeditions WHERE status = 'Open' ORDER BY base_price DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT guide_id, full_name, certification_level, daily_rate FROM guides WHERE certification_level = 'Expert';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT client_id, full_name, email, loyalty_tier FROM clients WHERE loyalty_tier = 'Gold';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT e.trip_name, g.full_name AS lead_guide, d.region_name FROM expeditions e JOIN guides g ON e.lead_guide_id = g.guide_id JOIN destinations d ON e.destination_id = d.destination_id WHERE e.status = 'Completed';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT b.booking_id, c.full_name AS client_name, b.num_guests, b.payment_status FROM bookings b JOIN clients c ON b.client_id = c.client_id JOIN expeditions e ON b.expedition_id = e.expedition_id WHERE e.trip_name = 'Inca Classic 7-Day';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT d.destination_id, d.region_name, d.country FROM destinations d WHERE d.destination_id NOT IN (SELECT DISTINCT e.destination_id FROM expeditions e WHERE e.lead_guide_id IS NOT NULL AND e.status IN ('Planning', 'Open'));"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT e.expedition_id, e.trip_name, COUNT(b.booking_id) AS booking_count, SUM(b.num_guests) AS total_guests FROM expeditions e JOIN bookings b ON e.expedition_id = b.expedition_id GROUP BY e.expedition_id, e.trip_name HAVING COUNT(b.booking_id) > 0;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT certification_level, ROUND(AVG(daily_rate), 2) AS avg_daily_rate FROM guides GROUP BY certification_level ORDER BY avg_daily_rate DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT c.full_name, c.loyalty_tier, COUNT(DISTINCT b.expedition_id) AS expedition_count FROM clients c JOIN bookings b ON c.client_id = b.client_id GROUP BY c.client_id, c.full_name, c.loyalty_tier HAVING COUNT(DISTINCT b.expedition_id) > 1;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE guides (\n guide_id INTEGER PRIMARY KEY,\n full_name TEXT NOT NULL,\n certificati... | [
{
"role": "assistant",
"content": "SELECT d.region_name, d.country, COALESCE(SUM(b.total_paid), 0) AS total_revenue FROM destinations d LEFT JOIN expeditions e ON d.destination_id = e.destination_id AND e.status = 'Completed' LEFT JOIN bookings b ON e.expedition_id = b.expedition_id GROUP BY d.destination_i... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT name, monthly_price FROM plan WHERE is_active = 1 ORDER BY monthly_price DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT first_name, last_name, email, registration_date FROM customer WHERE strftime('%Y', REPLACE(registration_date, '/', '-')) = '2023' ORDER BY registration_date;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT name, country FROM provider WHERE support_email IS NULL OR support_email = '';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT c.first_name || ' ' || c.last_name AS customer_name, p.name AS plan_name FROM subscription s JOIN customer c ON s.customer_id = c.customer_id JOIN plan p ON s.plan_id = p.plan_id WHERE s.end_date IS NULL;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT c.first_name || ' ' || c.last_name AS customer_name, pl.name AS plan_name, ur.record_date, ur.data_used_mb, ur.minutes_used, ur.sms_used FROM usage_record ur JOIN subscription s ON ur.subscription_id = s.subscription_id JOIN customer c ON s.customer_id = c.customer_... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT pl.name AS plan_name, pl.monthly_price, pl.data_gb, pr.name AS provider_name, pr.country FROM plan pl JOIN provider pr ON pl.provider_id = pr.provider_id WHERE strftime('%Y', REPLACE(pl.launch_date, '/', '-')) = '2022';"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT pr.name AS provider_name, COUNT(s.subscription_id) AS active_subscriptions FROM provider pr JOIN plan pl ON pr.provider_id = pl.provider_id JOIN subscription s ON pl.plan_id = s.plan_id WHERE s.end_date IS NULL GROUP BY pr.provider_id, pr.name ORDER BY active_subscr... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT s.subscription_id, AVG(ur.data_used_mb) AS avg_monthly_data_mb FROM subscription s JOIN usage_record ur ON s.subscription_id = ur.subscription_id WHERE strftime('%Y-%m', REPLACE(ur.record_date, '/', '-')) BETWEEN '2023-01' AND '2023-03' GROUP BY s.subscription_id HA... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE provider (\n provider_id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n country TEX... | [
{
"role": "assistant",
"content": "SELECT pr.name AS provider_name, SUM(pl.monthly_price) AS monthly_recurring_revenue FROM provider pr JOIN plan pl ON pr.provider_id = pl.provider_id JOIN subscription s ON pl.plan_id = s.plan_id WHERE s.end_date IS NULL AND s.auto_renew = 1 GROUP BY pr.provider_id, pr.name... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT tier_name, monthly_price FROM subscription_tiers ORDER BY monthly_price DESC LIMIT 3;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT title, release_date FROM tracks WHERE strftime('%Y', REPLACE(release_date, '/', '-')) = '2023' ORDER BY release_date;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT l.display_name, t.tier_name FROM listeners l JOIN subscription_tiers t ON l.current_tier_id = t.tier_id;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT ph.played_at, tr.title, ar.stage_name, li.display_name FROM play_history ph JOIN tracks tr ON ph.track_id = tr.track_id JOIN artists ar ON tr.artist_id = ar.artist_id JOIN listeners li ON ph.listener_id = li.listener_id ORDER BY ph.played_at;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT tr.title, ph.playback_quality, st.max_audio_quality FROM play_history ph JOIN tracks tr ON ph.track_id = tr.track_id JOIN listeners li ON ph.listener_id = li.listener_id JOIN subscription_tiers st ON li.current_tier_id = st.tier_id;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT st.tier_name, COUNT(l.listener_id) AS listener_count FROM subscription_tiers st LEFT JOIN listeners l ON st.tier_id = l.current_tier_id GROUP BY st.tier_name ORDER BY listener_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT audio_format, ROUND(AVG(duration_seconds) / 60.0, 2) AS avg_duration_minutes FROM tracks GROUP BY audio_format ORDER BY avg_duration_minutes DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE subscription_tiers (\n tier_id INTEGER PRIMARY KEY,\n tier_name TEXT NOT NULL UNIQUE... | [
{
"role": "assistant",
"content": "SELECT li.display_name, date(REPLACE(ph.played_at, '/', '-')) AS play_date, COUNT(DISTINCT ph.track_id) AS tracks_played FROM play_history ph JOIN listeners li ON ph.listener_id = li.listener_id GROUP BY li.listener_id, play_date HAVING tracks_played >= 2;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT center_name, controller_brand, axis_count, hourly_rate FROM machine_centers WHERE machine_type = 'CNC Mill' ORDER BY hourly_rate DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT badge_number, full_name, certification_level, hire_date FROM operators WHERE hire_date > '2020-01-01' ORDER BY hire_date;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT wo_number, customer_name, part_number, due_date, priority FROM work_orders WHERE status = 'Released' ORDER BY due_date LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT wo.wo_number, wo.customer_name, wo.part_number, mc.center_name, mc.machine_type\nFROM work_orders wo\nJOIN operations o ON wo.wo_number = o.wo_number\nJOIN machine_centers mc ON o.center_id = mc.center_id\nWHERE o.op_sequence = (SELECT MIN(op_sequence) FROM operatio... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT pl.log_id, pl.log_date, pl.qty_good, pl.qty_scrap, pl.qty_rework, pl.downtime_minutes,\n op.full_name, op.badge_number, op.shift_assignment,\n o.op_description, o.wo_number\nFROM production_logs pl\nJOIN operators op ON pl.operator_id = op.operator_id\nJ... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT wo.wo_number, wo.part_number, o.op_description, op.full_name\nFROM work_orders wo\nJOIN operations o ON wo.wo_number = o.wo_number\nJOIN operators op ON o.assigned_operator_id = op.operator_id\nWHERE wo.status = 'In Process' AND o.assigned_operator_id IS NOT NULL;"
... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT mc.center_name, mc.machine_type,\n SUM(o.setup_minutes) AS total_setup_minutes,\n AVG(o.run_minutes_per_part) AS avg_run_minutes_per_part\nFROM machine_centers mc\nJOIN operations o ON mc.center_id = o.center_id\nGROUP BY mc.center_id, mc.center_name, mc... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT op.full_name, op.certification_level, op.shift_assignment,\n SUM(pl.qty_good) AS total_good,\n SUM(pl.qty_scrap) AS total_scrap,\n SUM(pl.qty_rework) AS total_rework\nFROM operators op\nJOIN production_logs pl ON op.operator_id = pl.operator_id\nGR... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT wo.wo_number, wo.customer_name, wo.part_number, wo.qty_ordered, log_totals.total_good\nFROM work_orders wo\nJOIN (\n SELECT o.wo_number, SUM(pl.qty_good) AS total_good\n FROM operations o\n JOIN production_logs pl ON o.operation_id = pl.operation_id\n GR... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE machine_centers (\n center_id INTEGER PRIMARY KEY,\n center_name TEXT NOT NULL,\n ... | [
{
"role": "assistant",
"content": "SELECT wo.wo_number, wo.part_number,\n ROUND(SUM(\n (julianday(pl.log_date || ' ' || pl.end_time) - julianday(pl.log_date || ' ' || pl.start_time)) * 24 * 60\n - pl.downtime_minutes\n ) / 60.0, 2) AS actual_hours,\n ROUND(SUM(o.setup_m... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT h.harvest_date, f.farm_name, cv.crop_name || ' ' || cv.variety_name AS variety, h.yield_kg, h.quality_grade\nFROM harvest_batches h\nJOIN farms f ON h.farm_id = f.farm_id\nJOIN crop_varieties cv ON h.variety_id = cv.variety_id\nORDER BY date(REPLACE(h.harvest_date, ... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT e.equipment_name, e.equipment_type, e.status, f.farm_name\nFROM equipment e\nLEFT JOIN farms f ON e.assigned_farm_id = f.farm_id\nWHERE e.status IN ('Maintenance', 'Retired')\nORDER BY e.status, e.equipment_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT farm_name, location, acreage\nFROM farms\nWHERE certified_organic = 0\nORDER BY farm_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT h.batch_id, f.farm_name, cv.crop_name || ' ' || cv.variety_name AS variety, d.distribution_date, d.quantity_kg, d.revenue_usd\nFROM distribution_logs d\nJOIN harvest_batches h ON d.batch_id = h.batch_id\nJOIN farms f ON h.farm_id = f.farm_id\nJOIN crop_varieties cv ... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT f.farm_name, cv.variety_name, h.harvest_date, h.yield_kg, h.quality_grade\nFROM harvest_batches h\nJOIN farms f ON h.farm_id = f.farm_id\nJOIN crop_varieties cv ON h.variety_id = cv.variety_id\nWHERE cv.crop_name = 'Tomato'\nORDER BY date(REPLACE(h.harvest_date, '/'... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT e.equipment_name, e.equipment_type, f.farm_name, f.location\nFROM equipment e\nJOIN farms f ON e.assigned_farm_id = f.farm_id\nORDER BY f.farm_name, e.equipment_type;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT cv.crop_name, cv.variety_name, SUM(h.yield_kg) AS total_yield_kg\nFROM harvest_batches h\nJOIN crop_varieties cv ON h.variety_id = cv.variety_id\nGROUP BY cv.crop_name, cv.variety_name\nORDER BY total_yield_kg DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "SELECT f.farm_name, SUM(d.revenue_usd) AS total_revenue, COUNT(DISTINCT d.batch_id) AS batches_distributed, AVG(d.revenue_usd) AS avg_revenue_per_log\nFROM distribution_logs d\nJOIN harvest_batches h ON d.batch_id = h.batch_id\nJOIN farms f ON h.farm_id = f.farm_id\nGROUP ... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE farms (\n farm_id INTEGER PRIMARY KEY,\n farm_name TEXT NOT NULL,\n location TEXT... | [
{
"role": "assistant",
"content": "WITH season_batches AS (\n SELECT h.*, f.farm_name, cv.crop_name, cv.variety_name\n FROM harvest_batches h\n JOIN farms f ON h.farm_id = f.farm_id\n JOIN crop_varieties cv ON h.variety_id = cv.variety_id\n WHERE date(REPLACE(h.harvest_date, '/', '-')) >= dat... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT first_name, last_name, registration_date FROM donors ORDER BY date(REPLACE(registration_date, '/', '-')) DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT name, target_amount FROM campaigns WHERE status = 'Active' ORDER BY target_amount DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT first_name || ' ' || last_name AS full_name, phone FROM donors WHERE phone IS NOT NULL ORDER BY last_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT d.first_name || ' ' || d.last_name AS donor_name, don.amount\nFROM donations don\nJOIN donors d ON don.donor_id = d.donor_id\nJOIN campaigns c ON don.campaign_id = c.campaign_id\nWHERE c.name = 'Clean Water Initiative'\nORDER BY don.donation_date;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT d.first_name || ' ' || d.last_name AS donor_name, pm.type, pm.provider\nFROM donors d\nJOIN payment_methods pm ON d.donor_id = pm.donor_id\nWHERE pm.is_default = 1\nORDER BY d.last_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT gm.sponsor_name, d.first_name || ' ' || d.last_name AS donor_name, gm.match_amount\nFROM grant_matches gm\nJOIN donors d ON gm.donor_id = d.donor_id\nJOIN campaigns c ON gm.campaign_id = c.campaign_id\nWHERE c.name = 'Literacy for All'\nORDER BY gm.match_date;"
}
... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT c.name, SUM(don.amount) AS total_donated\nFROM donations don\nJOIN campaigns c ON don.campaign_id = c.campaign_id\nGROUP BY c.campaign_id, c.name\nORDER BY total_donated DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT donor_tier, COUNT(*) AS donor_count\nFROM donors\nGROUP BY donor_tier\nORDER BY donor_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT d.first_name || ' ' || d.last_name AS donor_name, COUNT(DISTINCT don.campaign_id) AS campaign_count\nFROM donors d\nJOIN donations don ON d.donor_id = don.donor_id\nGROUP BY d.donor_id, donor_name\nHAVING campaign_count > 1\nORDER BY campaign_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE campaigns (\n campaign_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n... | [
{
"role": "assistant",
"content": "SELECT c.name,\n COALESCE(don_totals.total_donations, 0) AS total_donations,\n COALESCE(gm_totals.total_matches, 0) AS total_matches,\n COALESCE(don_totals.total_donations, 0) + COALESCE(gm_totals.total_matches, 0) AS grand_total\nFROM campaigns c\nLEFT J... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT name, abbreviation, founded_date FROM franchises WHERE founded_date > '2018-12-31' ORDER BY founded_date;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT a.first_name || ' ' || a.last_name AS athlete_name, f.abbreviation, a.jersey_number FROM athletes a JOIN franchises f ON a.franchise_id = f.franchise_id ORDER BY a.jersey_number DESC LIMIT 5;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT name, city, capacity FROM venues WHERE is_indoor = 1 AND capacity > 10000 ORDER BY capacity DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT m.match_date, hf.abbreviation AS home_team, af.abbreviation AS away_team, v.name AS venue_name FROM matches m JOIN franchises hf ON m.home_franchise_id = hf.franchise_id JOIN franchises af ON m.away_franchise_id = af.franchise_id JOIN venues v ON m.venue_id = v.venu... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT a.first_name || ' ' || a.last_name AS captain_name, f.name AS team_name, a.position, a.nationality FROM athletes a JOIN franchises f ON a.franchise_id = f.franchise_id WHERE a.is_captain = 1 ORDER BY f.name, a.last_name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT f.name AS franchise_name, f.abbreviation, v.name AS venue_name, v.city, v.court_surface FROM franchises f JOIN venues v ON f.home_venue_id = v.venue_id ORDER BY f.name;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT v.name AS venue_name, v.city, COUNT(m.match_id) AS matches_hosted, ROUND(AVG(m.attendance)) AS avg_attendance FROM matches m JOIN venues v ON m.venue_id = v.venue_id WHERE m.status = 'Final' AND m.attendance IS NOT NULL GROUP BY v.venue_id, v.name, v.city ORDER BY a... | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "SELECT f.abbreviation, a.position, COUNT(*) AS athlete_count FROM athletes a JOIN franchises f ON a.franchise_id = f.franchise_id GROUP BY f.franchise_id, f.abbreviation, a.position ORDER BY f.abbreviation, athlete_count DESC;"
}
] | {
"enable_thinking": false
} |
[
{
"role": "system",
"content": "You are a SQLite expert. Given a database schema and a question, reply with one SQLite SELECT query and nothing else."
},
{
"role": "user",
"content": "Schema:\nCREATE TABLE venues (\n venue_id INTEGER PRIMARY KEY AUTOINCREMENT,\n name TEXT NOT NULL,\n ci... | [
{
"role": "assistant",
"content": "WITH set_totals AS (\n SELECT\n ms.match_id,\n SUM(ms.home_points) AS total_home_points,\n SUM(ms.away_points) AS total_away_points\n FROM match_sets ms\n JOIN matches m ON ms.match_id = m.match_id\n WHERE m.season_year = 2024 AND m.status ... | {
"enable_thinking": false
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.