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 hospitality_technology.reviews ( review_id character varying(64) NOT NULL, property_... | [
{
"role": "user",
"content": "What is the average overall rating for each property?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT property_id, AVG(rating_overall) AS avg_rating\nFROM hospitality_technology.reviews\nGROUP BY property_id;",
"sql": null
},
{
"role": "us... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.service_locations (
location_id character varying(64) NOT NU... | [
{
"role": "user",
"content": "Find all service locations in the city of 'Albany' that are accessible. Show their IDs, names, and contact phone numbers along with their address.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT location_id, location_name, contact_phone, address FROM ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE manufacturing.components (
component_id character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "我想查询所有使用特定材料ID的组件信息,包括组件名称、零件编号和供应商ID,同时还需要获取该材料的名称和规格。",
"sql": null
},
{
"role": "assistant",
"content": "SELECT c.component_id, c.component_name, c.part_number, c.supplier_id, m.material_name, m.specification\nFROM manufacturing.components c\nJOIN 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
CREATE TABLE legal_services.invoices (
invoice_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "Show me all invoice numbers together with the client IDs and related case IDs for invoices issued after March 1st, 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, client_id, case_id FROM legal_services.invoices WHERE issue_date >... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens ( citizen_id character varying(64) NOT NULL, national_i... | [
{
"role": "user",
"content": "Which services have 'Eligibility' mentioned in their eligibility_criteria field?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT service_name, eligibility_criteria\nFROM government_services.services\nWHERE eligibility_criteria ILIKE '%Eligibility%';",... |
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 character varying(64) NOT NULL, first_name character ... | [
{
"role": "user",
"content": "Show all prescriptions with prescription_id, patient_id, medication_id, quantity_dispensed, and refills_allowed.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT prescription_id, patient_id, medication_id, quantity_dispensed, refills_allowed FROM healt... |
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 all top-level agencies that do not have a parent agency. Display their agency_id and agency_name.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agency_id, agency_name\nFROM government_services.agencies\nWHERE parent_agency_id IS NULL;",
"sq... |
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.follows ( follow_id.text, follower_user_id.text, following_user_id.text... | [
{
"role": "user",
"content": "How many users have followed more than one person in total?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT follower_user_id, COUNT(DISTINCT following_user_id) AS following_count\nFROM social_media.follows\nGROUP BY follower_user_id\nHAVING COUNT(DIST... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.routes ( route_id text PRIMARY KEY, route_number text, description te... | [
{
"role": "user",
"content": "Show me the first name, last name, and email address for all passengers who are part of the loyalty program with ID 'Gold'.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT first_name , last_name , email FROM transportation.passengers WHERE loyalty_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 cex_token_balance (",
"snapshot_time character varying(32) NOT NULL, -- the ... | [
{
"role": "user",
"content": "Which token symbol has the highest price among all tokens held by CEXes on the Polygon chain?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, MAX(price) AS max_price FROM cex_token_balance WHERE chain = 'Polygon' GROUP BY token_symbol OR... |
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.invoices ( invoice_id text, invoice_number text, client_id text, case... | [
{
"role": "user",
"content": "Which invoices were issued in March 2024, and what are their invoice numbers, total amounts, and due dates?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT invoice_number, total_amount, due_date FROM legal_services.invoices WHERE issue_date >= '2024-0... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.service_locations ( location_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "I want to know the total number of appointments per location along with the location name for appointments scheduled in March 2024.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT\n sl.location_name,\n COUNT(a.appointment_id) AS appointment_count\nF... |
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, -- ... | [
{
"role": "user",
"content": "Can you help me find the total passenger capacity for each train car on a specific route with route_id 'RT123'?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT tc.train_id, tc.car_id, tc.car_number, tc.capacity\nFROM train_station_management.train_car... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p... | [
{
"role": "user",
"content": "Show me the title of each game and the total number of game sessions played on servers hosting that game.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT t1.title, count(t3.session_id) FROM gaming_technology.games AS t1 JOIN gaming_technology.servers ... |
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.events ( event_id character varying(64) NOT NULL, contract_id character varying... | [
{
"role": "user",
"content": "Count the number of events for each hour of the day based on the emitted_at timestamp.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT EXTRACT(HOUR FROM emitted_at) AS event_hour, COUNT(*) AS event_count FROM web3.events GROUP BY event_hour ORDER BY e... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.agencies ( agency_id.text, agency_name.text, jurisdiction_level.... | [
{
"role": "user",
"content": "Can you list the names of agencies that do not have a parent agency assigned, ordered by their established date?",
"sql": null
},
{
"role": "assistant",
"content": "SELECT agency_id, agency_name, established_date\nFROM government_services.agencies\nWHERE parent_... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE government_services.citizens (
citizen_id character varying(64) NOT NULL, -- un... | [
{
"role": "user",
"content": "List the first name and last name of employees who were hired in the year 2023, along with the name of the agency they work for.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT e.first_name, e.last_name, a.agency_name FROM government_services.employee... |
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": "List the first and last names of citizens along with the reference numbers of the applications they have submitted.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.first_name , T1.last_name , T2.reference_number FROM government_services.citizens ... |
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.passengers ( passenger_id text PRIMARY KEY, first_name text, last_nam... | [
{
"role": "user",
"content": "Count the number of passengers in each month of the year 2024 based on their created_at date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT EXTRACT(MONTH FROM created_at) AS month, COUNT(*) AS passenger_count\nFROM transportation.passengers\nWHERE 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 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 token_basic_info ( coin_id character varying(100) NOT NULL, -- the id of the token t... | [
{
"role": "user",
"content": "Show me all tokens which have a 6-hour price change percentage above 2% and the current price, on the Arbitrum chain.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT token_symbol, price, price_change_percentage_6h\nFROM token_dexpool_info\nWHERE chain... |
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, propert... | [
{
"role": "user",
"content": "List all available services along with the property name where they are offered.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT s.service_id, s.service_name, p.property_name\nFROM hospitality_technology.services s\nJOIN hospitality_technology.propert... |
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 character varying(64) NOT NULL, firm_name charact... | [
{
"role": "user",
"content": "Show me the names, founding dates, and websites of all law firms whose name contains the word 'Legal' and were founded after the year 2005. Sort the results by their founding date.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT firm_name, founded_dat... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.vehicles (
vehicle_id character varying(64) NOT NULL, -- unique ... | [
{
"role": "user",
"content": "I need a list of all routes and the number of trips made on each route.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT route_id, COUNT(*) AS trip_count\nFROM transportation.trips\nGROUP BY route_id;",
"sql": null
},
{
"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 hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "Show all payments made for reservations that had more than 2 adults. Include the payment ID, amount, currency, reservation ID, guest full name, and the number of adults in the reservation.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT T1.payment_id,... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement.
##Table Structure
CREATE TABLE transportation.trips ( trip_id text PRIMARY KEY, route_id text, vehicle_id text, dri... | [
{
"role": "user",
"content": "Give me all trips where the trip status is 'Completed' with their trip ID, vehicle ID, and number of passengers.",
"sql": null
},
{
"role": "assistant",
"content": "SELECT trip_id, vehicle_id, passenger_count FROM transportation.trips WHERE status = 'Completed';... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 5