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
CREATE TABLE web3.events ( event_id character varying(64) NOT NULL, contract_id character varying(... | [
{
"role": "user",
"content": "List the username, registration date, and the creation date of the first wallet created by each user who owns at least one wallet."
},
{
"role": "assistant",
"content": "SELECT u.username, u.created_at AS registration_date, MIN(w.created_at) AS first_wallet_creation... |
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 character varying(64) NOT NULL, -- uniqu... | [
{
"role": "user",
"content": "Show me a list of all agencies and the number of distinct citizens who have submitted documents to each agency."
},
{
"role": "assistant",
"content": "SELECT a.agency_name, COUNT(DISTINCT d.citizen_id) AS citizen_count\nFROM government_services.documents d\nJOIN gov... |
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 erc1155_approval_for_all ( block_number bigint, block_timestamp timestamp, transactio... | [
{
"role": "user",
"content": "Show me the contract address and symbol for all ERC20 tokens that have at least one approval recorded."
},
{
"role": "assistant",
"content": "SELECT DISTINCT ea.contract_address, tm.symbol\nFROM erc20_approval ea\nLEFT JOIN token_prices_latest tm ON ea.contract_addr... |
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 i... | [
{
"role": "user",
"content": "Show the top 10 most expensive fuel log entries including fuel_log_id, vehicle make and model, location name and city, and total_cost."
},
{
"role": "assistant",
"content": "SELECT f.fuel_log_id,\n v.make,\n v.model,\n loc.name AS location_name,\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 hospitality_technology.properties (
property_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "Retrieve all active staff members who processed payments in USD within the last 30 days. Return staff first_name, last_name, property_name, and the count of payments processed."
},
{
"role": "assistant",
"content": "SELECT s.first_name, s.last_name, p.property_name,... |
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 the username and email of users who have disabled push notifications."
},
{
"role": "assistant",
"content": "SELECT u.username, u.email\nFROM social_media.users u\nJOIN social_media.user_settings s ON u.user_id = s.user_id\nWHERE s.push_notifications_enabled = ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE financial_services.customers ( customer_id text PRIMARY KEY, first_name text, last_na... | [
{
"role": "user",
"content": "Show all active customers who live in the same zip_code."
},
{
"role": "assistant",
"content": "SELECT a.customer_id AS cust1,\n b.customer_id AS cust2,\n a.zip_code\nFROM financial_services.customers a\nJOIN financial_services.customers b\n ON a.zip_co... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp(6) NOT NULL, block_number bigint NOT NULL, tr... | [
{
"role": "user",
"content": "For each ERC1155 contract in erc1155_approval_for_all, show contract_address, the count of approval-for-all events, and the number of unique current holders from nft_holders. Order by holder_count descending and limit to 5."
},
{
"role": "assistant",
"content": "SEL... |
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 trading_platform.users ( user_id character varying(64) NOT NULL, username character v... | [
{
"role": "user",
"content": "List the name and symbol for all assets that do not have a corresponding entry with the key 'website' in the metadata table."
},
{
"role": "assistant",
"content": "SELECT T1.name , T1.symbol FROM trading_platform.assets AS T1 LEFT JOIN trading_platform.metadata AS T... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE project_fundraising_record ( id.text, project_id.text, project_name.text, rounds_name... | [
{
"role": "user",
"content": "Show all tokens on the Ethereum chain in token_dexpool_info that had a price increase in the last 6 hours, along with their 24h trading volume and smart money ROI."
},
{
"role": "assistant",
"content": "SELECT td.token_symbol,\n td.price_change_percentage_6h,\... |
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_id... | [
{
"role": "user",
"content": "Retrieve each citizen's first_name, last_name, and their most recent notification's message_subject and sent_at, only for notifications sent via 'Email'."
},
{
"role": "assistant",
"content": "SELECT c.first_name,\n c.last_name,\n n.message_subject,\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 project_fundraising_record (",
"id character varying(32) NOT NULL, -- fundrais... | [
{
"role": "user",
"content": "Show me the total USD value of tokens held by each centralized exchange on the 'Polygon' chain for the most recent snapshot time. List the exchange name and the total USD value."
},
{
"role": "assistant",
"content": "WITH LatestSnapshot AS ( SELECT MAX(snapshot_time... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varcha... | [
{
"role": "user",
"content": "List all SUI coins that have the status 'inactive', including their owner address and coin_type."
},
{
"role": "assistant",
"content": "SELECT coin_type, owner FROM sui_coins WHERE status = 'inactive';"
},
{
"role": "user",
"content": "Add the name and s... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
CREATE TABLE trading_platform.users ( user_id text PRIMARY KEY, username text, email text, passwor... | [
{
"role": "user",
"content": "List the names and URLs of all available decentralized applications (DApps)."
},
{
"role": "assistant",
"content": "SELECT name, url FROM dapps;"
},
{
"role": "user",
"content": "For each agency, list the agency name and the total count of employees who ... |
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.reservations ( reservation_id character varying(64) NOT NULL, ... | [
{
"role": "user",
"content": "Show all reviews made by guests along with the guest_id, guest's reservation_id, and the related property's property_id and review_date."
},
{
"role": "assistant",
"content": "SELECT r.review_id, r.guest_id, r.reservation_id, r.property_id, r.review_date\nFROM hospi... |
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 transportation.drivers ( driver_id text, employee_id text, first_name text, last_name... | [
{
"role": "user",
"content": "List all maintenance logs for vehicles that had 'Oil Change' service in the last 3 months, showing vehicle ID, service date, and cost."
},
{
"role": "assistant",
"content": "SELECT vehicle_id, service_date, cost FROM transportation.maintenance_logs WHERE service_typ... |
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure
"CREATE TABLE project_fundraising_record (",
"id character varying(32) NOT NULL, -- fundrais... | [
{
"role": "user",
"content": "List the top 5 tokens by 24 hour trading volume on DEX pools."
},
{
"role": "assistant",
"content": "SELECT token_name, token_symbol, volume_24h \nFROM token_dexpool_info \nORDER BY volume_24h DESC LIMIT 5;"
},
{
"role": "user",
"content": "Show only 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 transportation.routes ( route_id text, route_number text, description text, origin_lo... | [
{
"role": "user",
"content": "List all completed trips, showing the trip ID, the names of the origin and destination locations for the trip, and the actual arrival time."
},
{
"role": "assistant",
"content": "SELECT t.trip_id, loc_origin.name AS origin_location_name, loc_dest.name AS destination... |
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": "What is the average number of refills allowed across all prescriptions?"
},
{
"role": "assistant",
"content": "SELECT AVG(refills_allowed) FROM healthcare.prescriptions;"
},
{
"role": "user",
"content": "Which token on each chain has the highest ROI and ... |
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 i... | [
{
"role": "user",
"content": "List all depots (location type 'Depot') and the number of vehicles assigned to each. Include the depot name and city."
},
{
"role": "assistant",
"content": "SELECT T1.name , T1.city , COUNT(T2.vehicle_id) FROM transportation.locations AS T1 LEFT JOIN transportatio... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 4