system stringlengths 3.56k 8.72k | conversations listlengths 4 26 |
|---|---|
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 ticket details. Key format: ticket:<ticket_id>
// HSET ticket:tkt_1a2b ticket_id... | [
{
"role": "user",
"content": "特定の列車ID 'train_789' に関連するすべてのメンテナンス記録の詳細を取得するのを手伝っていただけますか?"
},
{
"role": "assistant",
"content": "SMEMBERS train:train_789:maintenance\nHGETALL maintenance_record:<record_id>"
},
{
"role": "user",
"content": "Can you show me the total number of passenge... |
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
// db.createCollection('stations')
// Optional: Add unique index: db.stations.createIndex({ statio... | [
{
"role": "user",
"content": "Can you help me count the total number of active staff members in the database?"
},
{
"role": "assistant",
"content": "db.staff.countDocuments({ is_active: true });"
},
{
"role": "user",
"content": "What is the salary or compensation package for a 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
// Use Hashes for platform details. Key format: platform:<platform_id>
// HSET platform:plat_123 p... | [
{
"role": "user",
"content": "Can you provide the total number of cars associated with a specific train with train_id 'train_789'?"
},
{
"role": "assistant",
"content": "SCARD train:train_789:cars"
},
{
"role": "user",
"content": "What are the specific job responsibilities and daily ... |
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
// db.createCollection('platforms')
// Optional: db.platforms.createIndex({ platform_id: 1 }, { un... | [
{
"role": "user",
"content": "Can you help me get the total number of operational platforms across all stations?"
},
{
"role": "assistant",
"content": "db.platforms.countDocuments({ status: 'Operational' });"
},
{
"role": "user",
"content": "What is the detailed repair history of the... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE insurance.customers ( customer_id text, first_name text, last_name text, date_of_birt... | [
{
"role": "user",
"content": "Show the total number of customers in each state."
},
{
"role": "assistant",
"content": "SELECT\n state,\n COUNT(customer_id)\nFROM insurance.customers\nGROUP BY\n state;"
},
{
"role": "user",
"content": "What is the current location of train number 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. You are an expert in writing database language and you can refuse the user's question if the question is not related... | [
{
"role": "user",
"content": "What is the schedule of trains arriving at station with ID 'ST789' tomorrow?"
},
{
"role": "assistant",
"content": "I'm sorry, but I can't provide the train schedule for station ID 'ST789' as this information is not available in the current database. The table only ... |
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. Key pattern: 'inv:<inventory_record_id>'. Example: HSET inv:INVREC500 component_id "co... | [
{
"role": "user",
"content": "I need to get the inventory quantity and location for a specific batch number. Can you help with that?"
},
{
"role": "assistant",
"content": "HGETALL inv:<inventory_record_id>"
},
{
"role": "user",
"content": "Can you also show me the component ID associ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text,... | [
{
"role": "user",
"content": "For each medication manufacturer, show the total number of distinct generic names they produce."
},
{
"role": "assistant",
"content": "SELECT manufacturer, COUNT(DISTINCT generic_name) AS distinct_generic_name_count FROM healthcare.medications WHERE generic_name IS ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwor... | [
{
"role": "user",
"content": "Provide a summary for each transaction ID, showing the total amount of all its unspent UTXOs."
},
{
"role": "assistant",
"content": "SELECT transaction_id, SUM(amount) FROM utxos WHERE spent = false GROUP BY transaction_id"
},
{
"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. You are an expert in writing database language and you can refuse the user's question if the question is not related... | [
{
"role": "user",
"content": "What is the maintenance schedule for the platforms at the station with ID 'ST234' for the next month?"
},
{
"role": "assistant",
"content": "I'm sorry, but I don't have access to the maintenance schedule for the platforms at any station. The data I have only include... |
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_n... | [
{
"role": "user",
"content": "能否帮我统计特定车站(station_id 为 'station_xyz')的所有工作人员数量?"
},
{
"role": "assistant",
"content": "MATCH (s:Station {station_id: 'station_xyz'})<-[:BASED_AT]-(staff:Staff)\nRETURN COUNT(staff) AS total_staff"
},
{
"role": "user",
"content": "What is the manufacturi... |
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_n... | [
{
"role": "user",
"content": "Can you retrieve the total number of train cars for each train in the database?"
},
{
"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"
},
{
"rol... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifie... | [
{
"role": "user",
"content": "Count the number of posts that have a media URL but no textual content."
},
{
"role": "assistant",
"content": "SELECT COUNT(*) FROM social_media.posts AS T1 WHERE T1.media_url IS NOT NULL AND (T1.content IS NULL OR T1.content = '');"
},
{
"role": "user",
... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE social_media.users ( user_id character varying(64) NOT NULL, username character varyi... | [
{
"role": "user",
"content": "Find all users who have set their bio to a non-empty value, showing their username and email."
},
{
"role": "assistant",
"content": "SELECT username, email\nFROM social_media.users\nWHERE bio IS NOT NULL AND TRIM(bio) != '';"
},
{
"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 social_media.users (
user_id character varying(64) NOT NULL, -- unique identifie... | [
{
"role": "user",
"content": "List all users who have a non-empty bio and a profile picture URL."
},
{
"role": "assistant",
"content": "SELECT\n user_id,\n username,\n full_name,\n bio,\n profile_picture_url\nFROM social_media.users\nWHERE\n bio IS NOT NULL AND profile_picture_url IS NOT 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 train_station_management.train_cars (
car_id character varying(64) NOT NULL, -- U... | [
{
"role": "user",
"content": "Can you help me get the total number of passenger cars for each train car type in the database?"
},
{
"role": "assistant",
"content": "SELECT car_type, COUNT(*) as total_cars\nFROM train_station_management.train_cars\nWHERE car_type = 'Passenger'\nGROUP BY car_type;... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE social_media.users (
user_id character varying(64) NOT NULL, -- unique identifie... | [
{
"role": "user",
"content": "List usernames and bio information for users who have set a non-empty bio in their profile."
},
{
"role": "assistant",
"content": "SELECT username, bio\nFROM social_media.users\nWHERE bio IS NOT NULL AND TRIM(bio) <> '';"
},
{
"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 trading_platform.users ( user_id character varying(64) NOT NULL, username character v... | [
{
"role": "user",
"content": "For each peer port, count how many peers have used that port."
},
{
"role": "assistant",
"content": "SELECT port,\n COUNT(*) AS peer_count\nFROM trading_platform.peers\nGROUP BY port;"
},
{
"role": "user",
"content": "Give me the count of policies ... |
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_birth... | [
{
"role": "user",
"content": "List the plan_id, plan_name, and plan_type for all insurance plans where the insurance_provider is 'Humana'."
},
{
"role": "assistant",
"content": "SELECT\n plan_id,\n plan_name,\n plan_type\nFROM healthcare.insurance_plans\nWHERE\n insurance_provider = 'Humana'... |
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 character varying(64) NOT NULL, -- unique identifier... | [
{
"role": "user",
"content": "Count the total number of likes on posts versus likes on comments across the entire platform."
},
{
"role": "assistant",
"content": "SELECT CASE WHEN post_id IS NOT NULL THEN 'post' ELSE 'comment' END AS like_target, COUNT(*) AS total_likes FROM social_media.likes G... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE transportation.routes ( route_id.text, route_number.text, description.text, origin_lo... | [
{
"role": "user",
"content": "Count the number of trips for each route type."
},
{
"role": "assistant",
"content": "SELECT R.type, COUNT(T.trip_id) FROM transportation.trips AS T JOIN transportation.routes AS R ON T.route_id = R.route_id GROUP BY R.type;"
},
{
"role": "user",
"conten... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3