system stringlengths 323 8.06k | conversations listlengths 6 56 |
|---|---|
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE financial_services.accounts (
account_id character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "For each customer, provide a summary of their account statuses, showing their full name, account status, and the count of accounts for each status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.first_name, c.last_name, a.status, COUNT(a.account_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 trading_platform.assets (
asset_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Give me the list of DApp names and URLs whose description contains any asset symbol from the assets table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DISTINCT d.name, d.url\nFROM trading_platform.dapps d\nJOIN trading_platform.assets a ON d.descr... |
You are an expert in writing database language. You can write a corresponding 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": "Count how many achievements were unlocked on each calendar day. Show the date and the count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT DATE(unlocked_at) AS unlock_date, COUNT(*) AS achievement_count FROM gaming_technology.player_achievements GRO... |
You are an expert in writing database language. You can write a corresponding 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.likes ( like_id.text, user_id.text, post_id.text, comment_id.text, crea... | [
{
"role": "user",
"content": "Retrieve conversation IDs and user IDs of participants who joined after '2024-01-01', including their last_read_at timestamps.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT conversation_id, user_id, last_read_at FROM social_media.conversation_partic... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- ... | [
{
"role": "user",
"content": "For each property, show the property name, average price of available services, and the maximum price of available services.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT p.property_name,\n AVG(s.price) AS avg_price,\n MAX(s.price) AS ma... |
You are an expert in writing database language. You can write a corresponding 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, national_i... | [
{
"role": "user",
"content": "Which cities are listed as primary_address for citizens who have a verified account? Can you show the city names and the number of verified citizens in each city?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT SPLIT_PART(primary_address, ',', 1) AS 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 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 hospitality_technology.room_types (
room_type_id character varying(64) NOT NULL,... | [
{
"role": "user",
"content": "List all reviews that have a staff response, including the review comment, staff response text, and the ID of the staff who responded.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT comment, staff_response, response_staff_id FROM hospitality_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 hospitality_technology.services ( service_id text PRIMARY KEY, property_id text, ser... | [
{
"role": "user",
"content": "Get all pairs of services from the same department where one service is more expensive than another. Show department, service1_name, price1, service2_name, price2.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s1.department, s1.service_name AS 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 hospitality_technology.service_orders ( order_id text PRIMARY KEY, reservation_id te... | [
{
"role": "user",
"content": "List all service orders with quantity greater than 3, showing the order ID, total price, and the staff member who placed the order.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT order_id, total_price, staff_id_ordered\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
// Node Label: :Station
// Properties:
// station_id: String (Constraint: UNIQUE)
// station_... | [
{
"role": "user",
"content": "Can you retrieve the total number of train cars for each train in the database?",
"sql": null
},
{
"role": "assistant",
"content": "MATCH (t:Train)<-[:PART_OF_TRAIN]-(tc:TrainCar)\nRETURN t.train_id, t.train_number, COUNT(tc) AS total_cars\nORDER BY t.train_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_dexpool_info ( pair_address character varying(512) NOT NULL, token_name charac... | [
{
"role": "user",
"content": "List tokens on the 'Arbitrum' chain with a 24-hour trading volume greater than 1,000,000 USD. Show symbol, volume, and price.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, volume_24h, price FROM token_dexpool_info WHERE chain = 'Arbitr... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.diagnoses ( diagnosis_id.text, record_id.text, patient_id.text, doctor_id... | [
{
"role": "user",
"content": "I need to list all chronic diagnoses that have at least one prescription, including diagnosis_code, diagnosis_date, and medication_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT d.diagnosis_code, d.diagnosis_date, m.medication_name\nFROM health... |
You are an expert in writing database language. You can write a corresponding 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 each user’s user_id and username along with their total trading value (sum of quantity * price from trades) as a buyer for trades executed in June 2024. Show the top 5 users by total value descending.",
"sql": null
},
{
"role": "assistant",
"content": "SELE... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi... | [
{
"role": "user",
"content": "List all events and any token transfers that occurred in the same transaction, showing event_id, event_name, transfer_id, and token_symbol.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n e.event_id,\n e.event_name,\n tt.transfer_id,\n tk.token_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE legal_services.lawyers (
lawyer_id character varying(64) NOT NULL, -- unique id... | [
{
"role": "user",
"content": "Show me a list of all partners who were hired in 2021.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT lawyer_id,\n first_name,\n last_name,\n hire_date\nFROM legal_services.lawyers\nWHERE is_partner = true\n AND hire_date BETWEEN '... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE hospitality_technology.properties ( property_id text PRIMARY KEY, property_name text... | [
{
"role": "user",
"content": "List all staff members who are not managers, including their first name, last name, position, and the name of the property they work at.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name, T1.last_name, T1.position, T2.property_name FROM ho... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE trading_platform.users ( user_id.text, username.text, email.text, password_hash.text... | [
{
"role": "user",
"content": "For each user, show their username and the number of unique IP addresses from the peers table where the port is less than 2000.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT u.username, COUNT(DISTINCT p.ip_address) AS unique_ip_count\nFROM trading_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 smart_money_token_inflow ( token_address character varying(100) NOT NULL, -- the tok... | [
{
"role": "user",
"content": "For each chain, show the total token_amount and usd_value for selling transactions (type=2).",
"sql": null
},
{
"role": "assistant",
"content": "SELECT chain, SUM(token_amount) AS total_sold_amount, SUM(usd_value) AS total_sold_usd_value\nFROM smart_money_token_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text... | [
{
"role": "user",
"content": "Count the total number of distinct specialties listed in the doctors table.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT count(DISTINCT specialty) FROM healthcare.doctors;",
"sql": null
},
{
"role": "user",
"content": "Show the lice... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE social_media.users ( user_id text PRIMARY KEY, username text, email text, password_h... | [
{
"role": "user",
"content": "How many users have non-empty full_name and bio fields? Return only the count.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT COUNT(*)\nFROM social_media.users\nWHERE full_name IS NOT NULL\n AND full_name <> ''\n AND bio IS NOT NULL\n AND bio <> '... |
You are an expert in writing database language. You can write a corresponding 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 character varying(64) NOT NULL, -- uniq... | [
{
"role": "user",
"content": "List the total number of appointments for each status and also show the latest appointment_time for each status.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT status, COUNT(*) AS total_appointments, MAX(appointment_time) AS latest_appointment_time\n... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE healthcare.patient_insurance (
patient_insurance_id character varying(64) NOT NU... | [
{
"role": "user",
"content": "List all insurance plans that will expire within the next 30 days, showing the patient IDs and subscriber names.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT patient_id, subscriber_name, policy_number, expiration_date\nFROM healthcare.patient_insur... |
You are an expert in writing database language. You can write a corresponding 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 usernames and email addresses of users who have enabled both email and push notifications.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.username, T1.email FROM social_media.users AS T1 INNER JOIN social_media.user_settings AS T2 ON T1.user_... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 5