system
stringlengths
315
8.44k
conversations
listlengths
2
8
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": "List the top 5 most used services across all properties. Show service_name and total quantity ordered, ordered by quantity descending.", "sql": null }, { "role": "assistant", "content": "SELECT s.service_name,\n SUM(o.quantity) AS total_quantity\nFROM hosp...
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.documents ( document_id.text, application_id.text, citizen_id.te...
[ { "role": "user", "content": "List the document ID, document type, and the full name of the citizen who submitted the document, but only for documents submitted for applications with a status of 'Approved'.", "sql": null }, { "role": "assistant", "content": "SELECT T1.document_id, T1.documen...
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": "Show all peers, listing their ID, IP address, and port.", "sql": null }, { "role": "assistant", "content": "SELECT peer_id, ip_address, port FROM trading_platform.peers;", "sql": null } ]
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": "Which employees have been assigned to applications for services with a standard fee greater than 200? Show the employee's full name, job title, application ID, and the service name.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_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 financial_services.customers ( customer_id.text, first_name.text, last_name.text, da...
[ { "role": "user", "content": "Give me the number of active customers grouped by city.", "sql": null }, { "role": "assistant", "content": "SELECT city, COUNT(*) AS customer_count FROM financial_services.customers WHERE status = 'Active' GROUP BY city;", "sql": null }, { "role": "u...
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 all players who have unlocked any achievements in games released after 2020, and include the player's ID, achievement ID, the game's title, and the unlock date.", "sql": null }, { "role": "assistant", "content": "SELECT pa.player_id, pa.achievement_id, 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 legal_services.appointments ( appointment_id.text, client_id.text, lawyer_id.text, c...
[ { "role": "user", "content": "List all the appointments that overlap in time for the same location, showing both appointment IDs, their start and end times, and the location.", "sql": null }, { "role": "assistant", "content": "SELECT a1.appointment_id AS appointment_id_1, a2.appointment_id 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. ##Table Structure CREATE TABLE trading_platform.users ( user_id character varying(64) NOT NULL, -- unique iden...
[ { "role": "user", "content": "Retrieve the most recent log entry for each user, including action and logged_at.", "sql": null }, { "role": "assistant", "content": "SELECT l1.user_id,\n l1.action,\n l1.logged_at\nFROM trading_platform.logs l1\nWHERE l1.logged_at = (\n SELECT MAX(...
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 character varying(64) NOT NULL, route_id character va...
[ { "role": "user", "content": "Show me pairs of trip IDs that used the same vehicle.", "sql": null }, { "role": "assistant", "content": "SELECT\n t1.trip_id AS trip1_id,\n t2.trip_id AS trip2_id\nFROM transportation.trips AS t1\nJOIN transportation.trips AS t2\n ON t1.vehicle_id = t2.vehic...
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_bir...
[ { "role": "user", "content": "Show the total number of customers in each state.", "sql": null }, { "role": "assistant", "content": "SELECT\n state,\n COUNT(customer_id)\nFROM insurance.customers\nGROUP BY\n state;", "sql": null } ]
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.policies ( policy_id.text, customer_id.text, product_id.text, agent_id.tex...
[ { "role": "user", "content": "For each policy, find its immediate predecessor policy for the same customer. Return customer_id, predecessor policy_number, current policy_number, predecessor end_date, and current start_date.", "sql": null }, { "role": "assistant", "content": "WITH ranked AS (...
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.guests ( guest_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Find guests who have made at least one payment using a 'CreditCard'. List their full name (first and last name) and email address.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT T1.first_name, T1.last_name, T1.email 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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "How many patients are there in each gender category?", "sql": null }, { "role": "assistant", "content": "SELECT gender,\n COUNT(*) AS patient_count\nFROM healthcare.patients\nGROUP BY gender;", "sql": null }, { "role": "user", "content": "O...
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.policies ( policy_id character varying(64) NOT NULL, customer_id character...
[ { "role": "user", "content": "List customers who have more than one policy. Show the customer ID and the count of policies.", "sql": null }, { "role": "assistant", "content": "SELECT customer_id, COUNT(*) AS policy_count FROM insurance.policies GROUP BY customer_id HAVING COUNT(*) > 1;", ...
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 identifi...
[ { "role": "user", "content": "Show me all users who have been notified by the system (i.e. notifications where the sender_user_id is NULL). Please include their username and the type of each notification.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, n.notification_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 insurance.customers ( customer_id character varying(64) NOT NULL, first_name charact...
[ { "role": "user", "content": "Count the number of premium payments that have a null payment method.", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) AS null_payment_method_count\nFROM insurance.premium_payments\nWHERE payment_method IS NULL;", "sql": null } ]
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 text, firm_name text, address text, phone text, w...
[ { "role": "user", "content": "I want each law firm's name, the total number of cases they have, and the total amount invoiced for those cases.", "sql": null }, { "role": "assistant", "content": "SELECT f.firm_name,\n COUNT(c.case_id) AS case_count,\n COALESCE(SUM(i.total_amount),...
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_profit ( address text, rank numeric, profit numeric, roi numeric, realiz...
[ { "role": "user", "content": "Show all addresses that made their last trade in 2024, including their chain and profit.", "sql": null }, { "role": "assistant", "content": "SELECT address, chain, profit FROM smart_money_profit WHERE last_trade_time LIKE '2024%';", "sql": null } ]
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": "Get appointment_id, scheduled_start_time, service_name, location_name, and city for all appointments booked via 'Phone' at accessible locations.", "sql": null }, { "role": "assistant", "content": "SELECT ap.appointment_id, ap.scheduled_start_time, s.service_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 web3.transactions ( transaction_id character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Show the average gas_price for each transaction status.", "sql": null }, { "role": "assistant", "content": "SELECT status, AVG(gas_price) AS avg_gas_price\nFROM web3.transactions\nGROUP BY status;", "sql": null }, { "role": "user", "content": "Ac...
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 the names of law firms founded after 2010, along with the full name of their managing partner.", "sql": null }, { "role": "assistant", "content": "SELECT f.firm_name, l.first_name, l.last_name FROM legal_services.law_firms AS f JOIN legal_services.lawyer...
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.orders ( order_id text, user_id text, wallet_id text, asset_id text...
[ { "role": "user", "content": "I want to see the number of 'buy' and 'sell' orders for each asset, along with the asset_id.", "sql": null }, { "role": "assistant", "content": "SELECT asset_id, order_type, COUNT(*) AS order_count FROM trading_platform.orders GROUP BY asset_id, order_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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "Which cities have more than 10 active customers in the state of Texas? Provide the city name and the customer count.", "sql": null }, { "role": "assistant", "content": "SELECT city, COUNT(*) AS customer_count\nFROM insurance.customers\nWHERE state = 'TX' AND sta...
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": "Show me all doctors who are affiliated with 'hospital_123', including their full names and specialties.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, specialty FROM healthcare.doctors WHERE hospital_affiliation_id = 'hospital_...
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": "What is the total amount invoiced per status?", "sql": null }, { "role": "assistant", "content": "SELECT status,\n SUM(total_amount) AS total_invoiced\nFROM legal_services.invoices\nGROUP BY status;", "sql": null }, { "role": "user", "conte...
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.token_transfers ( transfer_id text PRIMARY KEY, token_id text, from_address tex...
[ { "role": "user", "content": "Show me the top 10 token transfers by value, including the token ID and the transaction ID, sorted in descending order.", "sql": null }, { "role": "assistant", "content": "SELECT token_id, transaction_id, value FROM web3.token_transfers ORDER BY value DESC LIMIT...
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": "For each route, show its route number, distance in kilometers, and the total number of trips that have used that route.", "sql": null }, { "role": "assistant", "content": "SELECT r.route_number, r.distance_km, COUNT(t.trip_id) AS trip_count\nFROM transportation....
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 PRIMARY KEY, national_id_number text,...
[ { "role": "user", "content": "List the document ID, document type, and verification status for all documents verified by employees working for the agency with ID 'AG101'. Also include the verifying employee's full name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.document_i...
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.employees ( employee_id.text, agency_id.text, first_name.text, l...
[ { "role": "user", "content": "List all employees whose job titles differ from their direct managers. Provide each employee's full name, their job title, the manager's full name, and the manager's job title.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name || ' ' || e.l...
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_profit ( address character varying(100) NOT NULL, -- the user's address ...
[ { "role": "user", "content": "Calculate the average realized_ratio across all addresses.", "sql": null }, { "role": "assistant", "content": "SELECT AVG(realized_ratio) AS average_realized_ratio\nFROM smart_money_profit;", "sql": null } ]
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.achievements ( achievement_id uuid, game_id uuid, name text, descr...
[ { "role": "user", "content": "How many visible achievements are there per game, and what is the average point value of these achievements?", "sql": null }, { "role": "assistant", "content": "SELECT game_id, COUNT(*) AS visible_count, AVG(points) AS avg_points\nFROM gaming_technology.achievem...
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_n...
[ { "role": "user", "content": "For each security sector, calculate the total trading volume and the average closing price from market data for the past year. Include the sector name.", "sql": null }, { "role": "assistant", "content": "SELECT T1.sector, SUM(T2.volume) AS total_volume, AVG(T2.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 // PUT /stations { "mappings": { "properties": { "station_id": { "type": "keyword" },...
[ { "role": "user", "content": "Can you help me find all schedules for a specific route with route_id 'RT789' that includes the train details and the departure times?", "sql": null }, { "role": "assistant", "content": "SELECT s.schedule_id, s.departure_datetime, s.arrival_datetime, s.status, 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 social_media.users ( user_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "List users who commented on posts and the content of the post they commented on. Show commenter username and post content.", "sql": null }, { "role": "assistant", "content": "SELECT T1.username, T2.content FROM social_media.users AS T1 JOIN social_media.comments...
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 NOT NULL DEFAULT gen_random_uuid(), -- un...
[ { "role": "user", "content": "Can you show me the titles and release dates of all games developed by companies founded after 2018, as well as the name and country of each developer?", "sql": null }, { "role": "assistant", "content": "SELECT g.title, g.release_date, d.name AS developer_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 legal_services.clients ( client_id character varying(64) NOT NULL, first_name charac...
[ { "role": "user", "content": "Show me a summary of all clients with the total number of invoices they've received and the sum of total_amount for those invoices.", "sql": null }, { "role": "assistant", "content": "SELECT cl.client_id,\n CONCAT(cl.first_name, ' ', cl.last_name) AS clien...
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.developers ( developer_id uuid PRIMARY KEY, name text, country tex...
[ { "role": "user", "content": "List all players who have unlocked achievements related to items of rarity 'Epic'. Show the player_id, achievement_id, and the item_name associated with the achievement.", "sql": null }, { "role": "assistant", "content": "SELECT pa.player_id, pa.achievement_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 smart_money_token_performance ( token_address.text, token_symbol.text, pnl.numeric, ...
[ { "role": "user", "content": "List all smart money addresses that have a negative PNL but a positive Realized Ratio. Show the address, chain, PNL, and Realized Ratio.", "sql": null }, { "role": "assistant", "content": "SELECT token_address, chain, pnl, realized_ratio FROM smart_money_token_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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character...
[ { "role": "user", "content": "What is the average profit of smart money addresses whose profit is above $1,000, grouped by chain?", "sql": null }, { "role": "assistant", "content": "SELECT chain, AVG(profit) AS avg_profit\nFROM smart_money_profit\nWHERE profit > 1000\nGROUP BY 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.properties ( property_id text PRIMARY KEY, property_name text...
[ { "role": "user", "content": "Show me the total payment amount made by each guest, including their guest_id and full name.", "sql": null }, { "role": "assistant", "content": "SELECT g.guest_id, g.first_name || ' ' || g.last_name AS full_name, SUM(p.amount) AS total_paid\nFROM hospitality_tec...
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 PRIMARY KEY, first_name text, last_name text, sp...
[ { "role": "user", "content": "Find all doctors who have a hospital affiliation and include their full names (concatenated), specialties, and affiliation IDs.", "sql": null }, { "role": "assistant", "content": "SELECT CONCAT(first_name, ' ', last_name) AS full_name, specialty, hospital_affili...
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": "For each user, count the number of events emitted by smart contracts they deployed. Return user_id, username, and event_count, ordered by event_count descending.", "sql": null }, { "role": "assistant", "content": "SELECT u.user_id,\n u.username,\n 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 government_services.agencies ( agency_id character varying(64) NOT NULL, agency_name...
[ { "role": "user", "content": "List all agencies that do not have a website URL specified. Return their agency_id, agency_name, and main_phone_number.", "sql": null }, { "role": "assistant", "content": "SELECT agency_id, agency_name, main_phone_number FROM government_services.agencies WHERE w...
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 varch...
[ { "role": "user", "content": "List all SUI coins that have the status 'inactive', including their owner address and coin_type.", "sql": null }, { "role": "assistant", "content": "SELECT coin_type, owner FROM sui_coins WHERE status = 'inactive';", "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 insurance.customers ( customer_id.text, first_name.text, last_name.text, date_of_bir...
[ { "role": "user", "content": "Show the name of beneficiaries and the policy number for policies that are of product type 'life'.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.policy_number FROM insurance.policy_beneficiaries AS T1 JOIN insurance.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 government_services.notifications ( notification_id.text, citizen_id.text, applicati...
[ { "role": "user", "content": "List the message subjects for all notifications sent via the 'Push' channel that have a 'Sent' status.", "sql": null }, { "role": "assistant", "content": "SELECT message_subject FROM government_services.notifications WHERE channel = 'Push' AND status = 'Sent';",...
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_birt...
[ { "role": "user", "content": "List each patient's full name and the number of ongoing prescriptions they have (where end_date is null or end_date ≥ CURRENT_DATE).", "sql": null }, { "role": "assistant", "content": "SELECT p.patient_id,\n p.first_name || ' ' || p.last_name AS full_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 web3.events ( event_id character varying(64) NOT NULL, contract_id character varying...
[ { "role": "user", "content": "List the transaction IDs which have had more than one unique event emitted inside them.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id FROM web3.events GROUP BY transaction_id HAVING COUNT(DISTINCT event_name) > 1;", "sql": null ...
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.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti...
[ { "role": "user", "content": "Find beneficiaries with percentage_share above 50% for policies that have any claim with estimated_loss greater than 20000. Show beneficiary_id, first_name, last_name, and policy_id.", "sql": null }, { "role": "assistant", "content": "SELECT pb.beneficiary_id, 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 transportation.passengers ( passenger_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Show me all bookings with the passenger's full name and the booking status.", "sql": null }, { "role": "assistant", "content": "SELECT b.booking_id, p.first_name || ' ' || p.last_name AS passenger_full_name, b.status\nFROM transportation.bookings b\nJOIN transpo...
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": "Calculate the total points from all achievements unlocked by each player. Show player_id and total points.", "sql": null }, { "role": "assistant", "content": "SELECT pa.player_id, SUM(a.points) AS total_points FROM gaming_technology.player_achievements AS pa JOI...
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 text PRIMARY KEY, first_name text, last_name text...
[ { "role": "user", "content": "List the full name, email, and phone number of all partners together with the full name of a non-partner lawyer in the same law firm.", "sql": null }, { "role": "assistant", "content": "SELECT p.first_name AS partner_first_name, p.last_name AS partner_last_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 legal_services.cases ( case_id text, case_number text, case_name text, client_id tex...
[ { "role": "user", "content": "Show me all pairs of cases led by the same lawyer, including both case names and the lead lawyer ID.", "sql": null }, { "role": "assistant", "content": "SELECT c1.lead_lawyer_id,\n c1.case_name AS case_name_1,\n c2.case_name AS case_name_2\nFROM lega...
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, first_name.text, last_name.text, da...
[ { "role": "user", "content": "Show me the total number of trades and the total traded value for each customer, including their first and last names.", "sql": null }, { "role": "assistant", "content": "SELECT c.customer_id, c.first_name, c.last_name, COUNT(t.trade_id) AS trade_count, SUM(t.to...
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 character varying(64) NOT NULL, -- unique id...
[ { "role": "user", "content": "Which diagnosis codes have been used for more than 5 different patients? Show the diagnosis_code and the patient count.", "sql": null }, { "role": "assistant", "content": "SELECT diagnosis_code, COUNT(DISTINCT patient_id) AS patient_count FROM healthcare.diagnos...
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.rooms ( room_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "List all staff members, including their first name, last name, position, and the name of the property they work at.", "sql": null }, { "role": "assistant", "content": "SELECT s.first_name, s.last_name, s.position, p.property_name FROM hospitality_technology.staf...
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.policy_beneficiaries ( beneficiary_id text, policy_id text, customer_id te...
[ { "role": "user", "content": "Show me all policy beneficiaries who were added in the last 6 months, along with their full names and relationship to the policyholder.", "sql": null }, { "role": "assistant", "content": "SELECT beneficiary_id, policy_id, first_name, last_name, relationship, per...
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 character varying(64) NOT NULL, first_name characte...
[ { "role": "user", "content": "Count the number of patients grouped by gender, showing gender and patient_count.", "sql": null }, { "role": "assistant", "content": "SELECT gender, COUNT(*) AS patient_count\nFROM healthcare.patients\nGROUP BY gender;", "sql": null } ]
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 all documents, including their document_id, document_type, upload_timestamp, and the reference number of the associated application.", "sql": null }, { "role": "assistant", "content": "SELECT d.document_id, d.document_type, d.upload_timestamp, a.reference_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 social_media.follows ( follow_id text, follower_user_id text, following_user_id text...
[ { "role": "user", "content": "How many users does each user follow? Show the follower user ID and the count.", "sql": null }, { "role": "assistant", "content": "SELECT follower_user_id, count(*) FROM social_media.follows GROUP BY follower_user_id;", "sql": null } ]
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 text, property_id text, guest_i...
[ { "role": "user", "content": "Provide the monthly reservation count and total revenue for reservations made through 'Online Travel Agency' in 2023.", "sql": null }, { "role": "assistant", "content": "SELECT DATE_TRUNC('month', check_in_date) AS month,\n COUNT(*) AS reservation_count,\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.text, property_name.text, address_li...
[ { "role": "user", "content": "Show each property's name, the number of available rooms, and the number of available services it currently offers.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_name,\n COUNT(DISTINCT r.room_id) AS available_rooms,\n COUNT(DI...
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.messages ( message_id.text, conversation_id.text, sender_user_id.text, ...
[ { "role": "user", "content": "List all messages that haven’t triggered any notification; show message_id, sender_user_id, and sent_at.", "sql": null }, { "role": "assistant", "content": "SELECT m.message_id, m.sender_user_id, m.sent_at\nFROM social_media.messages AS m\nLEFT JOIN social_media...
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.employees ( employee_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "How many employees are there in each department grouped by their status?", "sql": null }, { "role": "assistant", "content": "SELECT department,\n status,\n COUNT(*) AS employee_count\nFROM financial_services.employees\nGROUP BY department, status;", ...
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": "Show me all insurance plans where the website includes 'secure'.", "sql": null }, { "role": "assistant", "content": "SELECT * FROM healthcare.insurance_plans WHERE website ILIKE '%secure%';", "sql": null } ]
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.text, property_id.text, reservation_id.te...
[ { "role": "user", "content": "List all review IDs, comments, and overall ratings for reviews submitted for property 'P123'.", "sql": null }, { "role": "assistant", "content": "SELECT review_id, comment, rating_overall FROM hospitality_technology.reviews WHERE property_id = 'P123';", "sql...
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, project_id character...
[ { "role": "user", "content": "For all chains, which token held by centralized exchanges (CEX) has the highest ROI according to smart money token performance? Show token symbol, chain, exchange, total USD value held on CEX, and the smart money ROI.", "sql": null }, { "role": "assistant", "con...
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.guests ( guest_id.text, first_name.text, last_name.text, emai...
[ { "role": "user", "content": "Which guests have used services that are currently unavailable? Show guest full names, the service name, and the order status.", "sql": null }, { "role": "assistant", "content": "SELECT g.first_name, g.last_name, s.service_name, so.status\nFROM hospitality_techn...
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, -- fundraising reco...
[ { "role": "user", "content": "Find narratives from the narrative_info table where the top 3 coins list contains either 'BTC' or 'ETH'.", "sql": null }, { "role": "assistant", "content": "SELECT narrative FROM narrative_info WHERE top_3_coins LIKE '%BTC%' OR top_3_coins LIKE '%ETH%';", "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 legal_services.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "I need a list showing the name of each law firm and the full name of every lawyer employed by that firm.", "sql": null }, { "role": "assistant", "content": "SELECT T1.firm_name, T2.first_name, T2.last_name FROM law_firms AS T1 JOIN lawyers AS T2 ON T1.firm_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 healthcare.medical_records ( record_id.text, patient_id.text, appointment_id.text, d...
[ { "role": "user", "content": "List all primary insurance policies that will expire within the next 30 days. Return patient_insurance_id, patient_id, policy_number, and expiration_date.", "sql": null }, { "role": "assistant", "content": "SELECT patient_insurance_id,\n patient_id,\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 legal_services.law_firms ( firm_id text PRIMARY KEY, firm_name text, address text, p...
[ { "role": "user", "content": "Show each law firm's name and the number of cases where its managing partner is the lead attorney.", "sql": null }, { "role": "assistant", "content": "SELECT T1.firm_name, COUNT(T2.case_id) AS case_count_as_managing_partner FROM law_firms AS T1 JOIN cases AS T2 ...
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.servers ( server_id uuid, game_id uuid, server_name text, region t...
[ { "role": "user", "content": "List all pairs of servers in the same region that are both 'online', showing server1_name, server2_name, and the absolute difference in current_players.", "sql": null }, { "role": "assistant", "content": "SELECT\n s1.server_name AS server1_name,\n s2.server_na...
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, customer_id...
[ { "role": "user", "content": "Show me all accounts (account_id, account_number, account_type, balance, currency) for customers whose status is 'VIP'.", "sql": null }, { "role": "assistant", "content": "SELECT a.account_id, a.account_number, a.account_type, a.balance, a.currency FROM financia...
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.wallets ( wallet_id text, user_id text, address text, private_key t...
[ { "role": "user", "content": "List peer IDs and IP addresses for all peers whose IP address starts with '10.'.", "sql": null }, { "role": "assistant", "content": "SELECT peer_id, ip_address FROM trading_platform.peers WHERE ip_address LIKE '10.%';", "sql": null } ]
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 character varying(64) NOT NULL, employee_id chara...
[ { "role": "user", "content": "Could you provide the route number, the name of the origin location, and the name of the destination location for all routes?", "sql": null }, { "role": "assistant", "content": "SELECT T1.route_number , T2.name , T3.name FROM transportation.routes AS T1 JOIN 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 government_services.service_locations ( location_id character varying(64) NOT NULL, ...
[ { "role": "user", "content": "Provide a list of all future appointments showing appointment_id, scheduled_start_time, location_name, city, and state.", "sql": null }, { "role": "assistant", "content": "SELECT\n a.appointment_id,\n a.scheduled_start_time,\n sl.location_name,\n sl.city,\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 blockchain.nodes ( node_id text PRIMARY KEY, ip_address text, port int, last_seen ti...
[ { "role": "user", "content": "Show me pairs of node_id and node_id for nodes that share the same ip_address but have different port numbers.", "sql": null }, { "role": "assistant", "content": "SELECT n1.node_id AS node_id1, n2.node_id AS node_id2, n1.ip_address, n1.port AS port1, n2.port AS ...
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, prop...
[ { "role": "user", "content": "Show me all service orders with their order ID, guest ID, reservation ID, and the name of the property where the order was made.", "sql": null }, { "role": "assistant", "content": "SELECT so.order_id, so.guest_id, so.reservation_id, p.property_name\nFROM hospita...
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 Collection 'assembly_steps'. Document structure: { _id: <ObjectId (or step_id)>, step_id: String,...
[ { "role": "user", "content": "特定の組み立てラインに割り当てられた従業員とそのラインの手順情報を取得したいです。従業員ID、名前、職種と手順名、手順番号を含めてください。", "sql": null }, { "role": "assistant", "content": "db.employees.aggregate([\n { $match: { assigned_line_id: '<specific_line_id>' } },\n { $lookup: {\n from: 'assembly_steps',\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 legal_services.clients ( client_id text, first_name text, last_name text, company_na...
[ { "role": "user", "content": "List all appointments along with their subject and start time for lawyers specializing in 'Criminal Law'.", "sql": null }, { "role": "assistant", "content": "SELECT T1.subject, T1.start_time FROM legal_services.appointments AS T1 JOIN legal_services.lawyers 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 smart_money_token_performance ( token_address text, token_symbol text, pnl numeric, ...
[ { "role": "user", "content": "Find tokens with positive ROI and a positive net flow from smart money addresses. For these tokens, show their symbol, chain, ROI, net flow, and the total USD value from buy transactions.", "sql": null }, { "role": "assistant", "content": "SELECT T1.token_symbol...
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.locations ( location_id text PRIMARY KEY, name text, type text, addre...
[ { "role": "user", "content": "Show the name and city of all maintenance facility locations and include the total number of maintenance logs performed at each location.", "sql": null }, { "role": "assistant", "content": "SELECT l.name, l.city, COUNT(m.log_id) AS maintenance_count\nFROM transp...
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, route_id text, vehicle_id text, driver_id text,...
[ { "role": "user", "content": "List all trips with their trip_id, vehicle_id, and the corresponding origin_location_id and destination_location_id, but only where the origin and destination are not the same.", "sql": null }, { "role": "assistant", "content": "SELECT trip_id, vehicle_id, origi...
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.policies ( policy_id text, customer_id text, product_id text, agent_id tex...
[ { "role": "user", "content": "Show all document types uploaded for claim ID 'CLM12345' and the time each was uploaded.", "sql": null }, { "role": "assistant", "content": "SELECT document_type, uploaded_at\nFROM insurance.claim_documents\nWHERE claim_id = 'CLM12345';", "sql": null } ]
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": "Show me the number of primary insurance policies per insurance provider, including the provider name and the count.", "sql": null }, { "role": "assistant", "content": "SELECT ip.insurance_provider, COUNT(*) AS primary_policy_count\nFROM healthcare.patient_insura...
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, token_name character var...
[ { "role": "user", "content": "For each chain, show the sum of smart money USD buy value and the average buy price for the 'AI' narrative, along with the top token by DEX liquidity from token_dexpool_info.", "sql": null }, { "role": "assistant", "content": "WITH ai_inflow AS (\n SELECT 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 government_services.agencies ( agency_id text PRIMARY KEY, agency_name text, jurisdi...
[ { "role": "user", "content": "Show me the daily number of notifications sent in March 2024.", "sql": null }, { "role": "assistant", "content": "SELECT DATE(sent_at) AS date, COUNT(*) AS notification_count\nFROM government_services.notifications\nWHERE sent_at >= '2024-03-01' AND sent_at < '2...
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 PRIMARY KEY, agency_name text, jurisdi...
[ { "role": "user", "content": "List the application ID, citizen ID, assigned employee's full name, and total amount paid for each approved application.", "sql": null }, { "role": "assistant", "content": "SELECT a.application_id,\n a.citizen_id,\n e.first_name || ' ' || e.last_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 project_fundraising_record ( id character varying(32) NOT NULL, project_id character...
[ { "role": "user", "content": "Show all tokens on the 'Arbitrum' chain from DEX pools that have a 24-hour trading volume between $100,000 and $500,000. Display token symbol, price, and volume_24h.", "sql": null }, { "role": "assistant", "content": "SELECT\n token_symbol,\n price,\n volume_...
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.employees ( employee_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Find employees who were hired after their managers. Display the employee's full name, their hire date, the manager's full name, and the manager's hire date.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name || ' ' || e.last_name AS 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 hospitality_technology.rooms ( room_id text PRIMARY KEY, property_id text, room_numb...
[ { "role": "user", "content": "List all non-smoking rooms at property 'PROP01' that have a status of 'OutOfOrder'. Show the room number and floor.", "sql": null }, { "role": "assistant", "content": "SELECT room_number, floor FROM hospitality_technology.rooms WHERE property_id = 'PROP01' AND i...
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 nft_holders ( block_number.bigint, contract_address.text, wallet_address.text, token...
[ { "role": "user", "content": "List all token transfers from address '0xsend...' in the token_activities table, showing the tick, amt, and to_address.", "sql": null }, { "role": "assistant", "content": "SELECT tick, amt, to_address FROM token_activities WHERE from_address = '0xsend...';", ...
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, project_id character...
[ { "role": "user", "content": "Show me the top 5 projects by total investment value, along with their latest fundraising round name and valuation.", "sql": null }, { "role": "assistant", "content": "SELECT project_name, rounds_name, valuation, SUM(investment_value) AS total_investment_value F...
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.services ( service_id text PRIMARY KEY, agency_id text, service_...
[ { "role": "user", "content": "What is the average processing time in days for active services?", "sql": null }, { "role": "assistant", "content": "SELECT AVG(average_processing_time_days) FROM government_services.services WHERE is_active = TRUE", "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.rooms ( room_id.text, property_id.text, room_number.text, roo...
[ { "role": "user", "content": "Give me the average cleanliness rating from reviews for each property.", "sql": null }, { "role": "assistant", "content": "SELECT property_id, AVG(rating_cleanliness) AS avg_cleanliness_rating\nFROM hospitality_technology.reviews\nGROUP BY property_id;", "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 legal_services.invoices ( invoice_id text PRIMARY KEY, invoice_number text UNIQUE, c...
[ { "role": "user", "content": "Show me each invoice and the invoice_number of the next invoice for the same client, along with how many days apart their issue_dates are.", "sql": null }, { "role": "assistant", "content": "SELECT a.invoice_number AS invoice_number,\n b.invoice_number AS ...
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_n...
[ { "role": "user", "content": "For each security, I want its ticker_symbol, the date when it hit its highest close_price, and the total traded quantity across all trades.", "sql": null }, { "role": "assistant", "content": "SELECT s.ticker_symbol,\n md.data_timestamp AS highest_close_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 blockchain.transactions ( transaction_id character varying(64) NOT NULL, -- uni...
[ { "role": "user", "content": "Show all transactions where the sender and receiver are different addresses but the transaction amount is exactly 1000. Include transaction_id, sender_address, receiver_address, and timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT transactio...
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.time_entries ( entry_id text PRIMARY KEY, case_id text, lawyer_id tex...
[ { "role": "user", "content": "Show me all time entries for case ID 'case_abc', including the entry ID, date worked, hours spent, and the first and last name of the lawyer.", "sql": null }, { "role": "assistant", "content": "SELECT te.entry_id, te.date_worked, te.hours_spent, l.first_name, l....