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 social_media.posts ( post_id character varying(64) NOT NULL, user_id character varyi...
[ { "role": "user", "content": "I want to see all comments that have been liked at least once. Return comment_id and the count of likes as like_count.", "sql": null }, { "role": "assistant", "content": "SELECT c.comment_id,\n COUNT(l.like_id) AS like_count\nFROM social_media.comments c\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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "Show me each player's username, the names of achievements they've unlocked, the game title each achievement belongs to, and the points for each achievement.", "sql": null }, { "role": "assistant", "content": "SELECT p.username, a.name AS achievement_name, g.titl...
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 the names and emails of all guests who have communication consent enabled.", "sql": null }, { "role": "assistant", "content": "SELECT first_name, last_name, email FROM hospitality_technology.guests WHERE communication_consent = TRUE;", "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 financial_services.customers ( customer_id character varying(64) NOT NULL, -- u...
[ { "role": "user", "content": "Show me the count of completed transactions and the sum of their amounts grouped by currency for May 2024.", "sql": null }, { "role": "assistant", "content": "SELECT currency,\n COUNT(*) AS transaction_count,\n SUM(amount) AS total_amount\nFROM finan...
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": "Get the appointment details including appointment_id, the full name of the citizen, the service name, and scheduled_start_time for all appointments booked via 'Phone', ordered by scheduled_start_time descending.", "sql": null }, { "role": "assistant", "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 social_media.user_settings ( setting_id text, user_id text, theme text, email_notifi...
[ { "role": "user", "content": "Can you show me all user IDs that have both email and push notifications disabled, along with whether their profile is set to private?", "sql": null }, { "role": "assistant", "content": "SELECT user_id, private_profile FROM social_media.user_settings WHERE email...
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 text, address text, abi text, bytecode text, deployer_a...
[ { "role": "user", "content": "Which user has created the most tokens? Please show the username and the number of tokens they have created.", "sql": null }, { "role": "assistant", "content": "SELECT u.username, COUNT(*) AS token_count\nFROM web3.tokens t\nJOIN web3.contracts c ON t.contract_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 blockchain.wallets ( wallet_id.text, user_id.text, address_id.text, private_key.text...
[ { "role": "user", "content": "Show me all wallet addresses that belong to user_id 'U12345'.", "sql": null }, { "role": "assistant", "content": "SELECT address_id FROM blockchain.wallets WHERE user_id = 'U12345';", "sql": null }, { "role": "user", "content": "Now join this wit...
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 text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "List every maintenance log for each vehicle, including the vehicle's license plate and the mechanic's name.", "sql": null }, { "role": "assistant", "content": "SELECT ml.log_id, ml.vehicle_id, v.license_plate, ml.service_date, ml.service_type, ml.description, ml...
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 character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "For each doctor, count how many medical record entries they have created and show the doctor_id alongside the record count.", "sql": null }, { "role": "assistant", "content": "SELECT doctor_id, COUNT(*) AS record_count\nFROM healthcare.medical_records\nGROUP BY ...
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.appointments ( appointment_id text, citizen_id text, employee_id...
[ { "role": "user", "content": "Can you list all appointments along with the scheduled start time, purpose, and booking method, as well as the employee ID and location ID for each appointment?", "sql": null }, { "role": "assistant", "content": "SELECT appointment_id, scheduled_start_time, purp...
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": "List all staff members showing their full name and position.", "sql": null }, { "role": "assistant", "content": "SELECT first_name || ' ' || last_name AS staff_full_name, position FROM hospitality_technology.staff;", "sql": null }, { "role": "user", ...
You are an expert in writing database language and you can refuse the user's question if the question is not related to the table structure. 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 CREA...
[ { "role": "user", "content": "What is the ticket price for a journey on train number T4321?", "sql": null }, { "role": "assistant", "content": "I'm sorry, but I don't have access to information about ticket prices for specific trains. The data I have is limited to train details such as model...
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": "List all agencies and their main phone numbers.", "sql": null }, { "role": "assistant", "content": "SELECT agency_name, main_phone_number FROM government_services.agencies;", "sql": null }, { "role": "user", "content": "Now show me the service lo...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id text, record_id text, patient_id text, doctor_id...
[ { "role": "user", "content": "List all diagnoses, including the description, diagnosis date, the patient's full name, and the doctor's full name who made the diagnosis.", "sql": null }, { "role": "assistant", "content": "SELECT d.description, d.diagnosis_date, p.first_name AS patient_first_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.documents ( document_id.text, case_id.text, document_name.text, docum...
[ { "role": "user", "content": "Give me the case_id and the count of appointments and documents for each case where at least one appointment exists.", "sql": null }, { "role": "assistant", "content": "SELECT a.case_id, COUNT(DISTINCT a.appointment_id) AS appointment_count, COUNT(DISTINCT d.doc...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.room_types ( room_type_id.text, property_id.text, type_name.t...
[ { "role": "user", "content": "Which room types offer both 'Sea View' and 'Balcony' amenities? Show their type names, property IDs, and base rates.", "sql": null }, { "role": "assistant", "content": "SELECT type_name, property_id, base_rate FROM hospitality_technology.room_types WHERE ameniti...
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": "Display all invoices along with the associated case name and the full name of the client.", "sql": null }, { "role": "assistant", "content": "SELECT i.invoice_number, cs.case_name, c.first_name || ' ' || c.last_name AS client_full_name\nFROM legal_services.invoi...
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.securities ( security_id text PRIMARY KEY, ticker_symbol text, is...
[ { "role": "user", "content": "I want to list each security alongside another security issued by the same issuer.", "sql": null }, { "role": "assistant", "content": "SELECT a.security_id, a.ticker_symbol, b.security_id AS other_security_id, b.ticker_symbol AS other_ticker, a.issuer_name\nFROM...
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.securities ( security_id text PRIMARY KEY, ticker_symbol text, is...
[ { "role": "user", "content": "Can you provide a summary of how many securities exist for each combination of exchange and sector?", "sql": null }, { "role": "assistant", "content": "SELECT exchange, sector, COUNT(*) AS total_count\nFROM financial_services.securities\nGROUP BY exchange, secto...
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.prescriptions ( prescription_id text, record_id text, patient_id text, do...
[ { "role": "user", "content": "How many prescriptions have been issued per patient?", "sql": null }, { "role": "assistant", "content": "SELECT patient_id, COUNT(*) AS prescription_count\nFROM healthcare.prescriptions\nGROUP BY patient_id;", "sql": null }, { "role": "user", "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 gaming_technology.games ( game_id uuid PRIMARY KEY, title text, developer_id uuid, p...
[ { "role": "user", "content": "How many game sessions has each player started? Show player ID and the total count.", "sql": null }, { "role": "assistant", "content": "SELECT player_id, count(*) AS session_count FROM game_sessions GROUP BY player_id;", "sql": null }, { "role": "use...
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 "c...
[ { "role": "user", "content": "Can you help me retrieve the inventory details for a specific component ID, including the quantity and warehouse location?", "sql": null }, { "role": "assistant", "content": "HGETALL inv:<inventory_record_id>", "sql": null }, { "role": "user", "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 blockchain.blocks ( block_id text, previous_block_id text, timestamp timestamp, nonc...
[ { "role": "user", "content": "Show me the average transaction amount per block, along with the block timestamp.", "sql": null }, { "role": "assistant", "content": "SELECT b.block_id, b.timestamp as block_timestamp, AVG(t.amount) as avg_transaction_amount FROM blockchain.blocks b JOIN blockch...
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": "List the doctor ID, last name, and the date they were updated, for all doctors updated in the year 2024.", "sql": null }, { "role": "assistant", "content": "SELECT doctor_id, last_name, updated_at FROM healthcare.doctors WHERE updated_at >= '2024-01-01' AND upda...
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 NOT NULL DEFAULT gen_random_uuid(), game_...
[ { "role": "user", "content": "I want to compare servers within the same region. List pairs of servers where one has fewer current_players than the other. Include each server's name, region, and their current_players counts.", "sql": null }, { "role": "assistant", "content": "SELECT s1.server...
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.insurance_plans ( plan_id.text, plan_name.text, insurance_provider.text, ...
[ { "role": "user", "content": "I want to find all pairs of insurance plans that share the same contact phone number, showing plan IDs, names, and the shared phone.", "sql": null }, { "role": "assistant", "content": "SELECT p1.plan_id, p1.plan_name, p2.plan_id AS plan_id_2, p2.plan_name AS pla...
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.text,...
[ { "role": "user", "content": "What is the total number of ERC20 tokens in the `token_metas` table that are marked as a proxy (is_proxy = 1)?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(*) FROM token_metas WHERE is_erc20 = 1 AND is_proxy = 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 hospitality_technology.properties ( property_id character varying(64) NOT NULL, prop...
[ { "role": "user", "content": "Provide the total number of room types and the average base_rate for each property that has a star_rating of at least 4.0.", "sql": null }, { "role": "assistant", "content": "SELECT p.property_id,\n p.property_name,\n COUNT(rt.room_type_id) AS room_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 text PRIMARY KEY, username text, email text, password_h...
[ { "role": "user", "content": "List all group conversation names along with the number of different users who have sent a message in each group.", "sql": null }, { "role": "assistant", "content": "SELECT c.group_name, COUNT(DISTINCT m.sender_user_id) AS unique_senders\nFROM social_media.conve...
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 coin types and symbols from the sui_coins_metadata table.", "sql": null }, { "role": "assistant", "content": "SELECT coin_type, symbol FROM sui_coins_metadata;", "sql": null }, { "role": "user", "content": "Only show coins with status '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 insurance.claims ( claim_id character varying(64) NOT NULL, policy_id character vary...
[ { "role": "user", "content": "For each claim, count the number of documents linked to it. Show claim_id and document_count for claims that have more than 3 documents.", "sql": null }, { "role": "assistant", "content": "SELECT claim_id, COUNT(*) AS document_count\nFROM insurance.claim_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 transportation.maintenance_logs ( log_id character varying(64) NOT NULL, vehicle_id ...
[ { "role": "user", "content": "Find pairs of consecutive maintenance logs for the same vehicle based on service date. Show the vehicle ID, log IDs, service dates, and odometer readings for both logs in each pair.", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, log_id, 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 gaming_technology.achievements ( achievement_id uuid, game_id uuid, name text, descr...
[ { "role": "user", "content": "I want to list each hidden achievement alongside the highest-point visible achievement in the same game, showing game_id, hidden_name, and visible_name.", "sql": null }, { "role": "assistant", "content": "WITH max_vis AS (\n SELECT game_id, MAX(points) AS max_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 blockchain.wallets ( wallet_id character varying(64) NOT NULL, -- unique identi...
[ { "role": "user", "content": "Find all users who have wallets with private keys containing the substring 'abc'.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT user_id FROM blockchain.wallets WHERE private_key LIKE '%abc%';", "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 text, property_name text, address_li...
[ { "role": "user", "content": "List all service orders for spa services in the last month, including the guest ID and total price.", "sql": null }, { "role": "assistant", "content": "SELECT order_id, guest_id, total_price FROM hospitality_technology.service_orders WHERE service_id LIKE 'SPA%'...
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.notifications ( notification_id text PRIMARY KEY, user_id text, mes...
[ { "role": "user", "content": "Get a list of users who have both read and unread notifications. For each user, show their user_id, the count of unread notifications as unread_count, and the count of read notifications as read_count.", "sql": null }, { "role": "assistant", "content": "SELECT 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 insurance.customers ( customer_id text PRIMARY KEY, first_name text, last_name text,...
[ { "role": "user", "content": "Show each policy number and the total amount paid for it across all premium payments received so far.", "sql": null }, { "role": "assistant", "content": "SELECT T1.policy_number, SUM(T2.amount_paid) FROM insurance.policies AS T1 JOIN insurance.premium_payments 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 financial_services.customers ( customer_id.text, first_name.text, last_name.text, da...
[ { "role": "user", "content": "For each branch, show the number of employees and the average tenure in days for those currently active.", "sql": null }, { "role": "assistant", "content": "SELECT branch_id, COUNT(*) AS employee_count, AVG(DATE_PART('day', CURRENT_DATE - hire_date)) AS avg_tenu...
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(), -...
[ { "role": "user", "content": "Show the usernames and registration dates for all players whose status is 'inactive'.", "sql": null }, { "role": "assistant", "content": "SELECT username, registration_date FROM players 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 healthcare.appointments ( appointment_id text PRIMARY KEY, patient_id text, doctor_i...
[ { "role": "user", "content": "Can you give me the total number of appointments grouped by status?", "sql": null }, { "role": "assistant", "content": "SELECT status,\n COUNT(*) AS total_appointments\nFROM healthcare.appointments\nGROUP BY status;", "sql": null }, { "role": "...
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 character varying(64) NOT NULL, poli...
[ { "role": "user", "content": "Find policies that have two different 'Spouse' beneficiaries. List policy_id, spouse1_id, and spouse2_id.", "sql": null }, { "role": "assistant", "content": "SELECT pb1.policy_id,\n pb1.beneficiary_id AS spouse1_id,\n pb2.beneficiary_id AS spouse2_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 social_media.users ( user_id.text, username.text, email.text, password_hash.text, fu...
[ { "role": "user", "content": "Show me a list of all notifications that are related to comments. Include the notification ID, the recipient user ID, and the target entity ID, which corresponds to the comment ID.", "sql": null }, { "role": "assistant", "content": "SELECT notification_id, recip...
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": "For each asset, show its name and the number of metadata entries associated with it, including assets with zero metadata, sorted by asset name ascending.", "sql": null }, { "role": "assistant", "content": "SELECT a.name, COUNT(m.metadata_id) AS metadata_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 healthcare.doctors ( doctor_id.text, first_name.text, last_name.text, specialty.text...
[ { "role": "user", "content": "List all doctors whose last name begins with 'B', showing their doctor ID, full name, and their hospital affiliation ID.", "sql": null }, { "role": "assistant", "content": "SELECT doctor_id, first_name, last_name, hospital_affiliation_id FROM healthcare.doctors ...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.appointments ( appointment_id character varying(64) NOT NULL, patient_id ...
[ { "role": "user", "content": "Show the total number of appointments created in 2024 for each doctor and each status.", "sql": null }, { "role": "assistant", "content": "SELECT doctor_id, status, COUNT(*) AS appointment_count FROM healthcare.appointments WHERE EXTRACT(YEAR FROM created_at) = ...
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, token_id text, from_address text, to_addres...
[ { "role": "user", "content": "For each transaction, show its transaction_id and the count of tokens transferred within that transaction.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, COUNT(token_id) AS tokens_transferred FROM web3.token_transfers GROUP BY transac...
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 PRIMARY KEY, customer_id text, product_id text, ...
[ { "role": "user", "content": "List all agents who have sold at least one policy for an insurance product of type 'Health'. For each agent, show their full name, agency name, and the product name.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT a.first_name || ' ' || a.las...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "Get the count of unread messages for each participant in each group chat, showing conversation_id, group_name, user_id, and unread_count.", "sql": null }, { "role": "assistant", "content": "SELECT cp.conversation_id, conv.group_name, cp.user_id, COUNT(m.message_...
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 lawyers who have any unbilled time entries. Show their first name, last name, and the count of their unbilled entries.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, COUNT(T2.entry_id) FROM lawyers AS T1 JOIN time_en...
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": "For each customer, show their full name, email, and the total trade amount they have made, joining customers to trades via account_id.", "sql": null }, { "role": "assistant", "content": "SELECT c.customer_id, c.first_name, c.last_name, c.email, SUM(t.total_amoun...
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.bookings ( booking_id character varying(64) NOT NULL, passenger_id ch...
[ { "role": "user", "content": "List all unique pairs of passenger_id and trip_id where a passenger booked more than one seat on the same trip. For each pair, show the booking_ids involved.", "sql": null }, { "role": "assistant", "content": "SELECT b1.passenger_id, b1.trip_id, b1.booking_id 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 healthcare.patients ( patient_id text, first_name text, last_name text, date_of_birt...
[ { "role": "user", "content": "Show all prescriptions along with the patient's full name and the medication name. Include prescription_id, prescription_date, patient first_name, patient last_name, and medication_name.", "sql": null }, { "role": "assistant", "content": "SELECT pr.prescription_...
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, -- unique id...
[ { "role": "user", "content": "List all cases opened between '2024-01-01' and '2024-03-31' along with the client's name and the lead lawyer's email address.", "sql": null }, { "role": "assistant", "content": "SELECT cs.case_name, cs.case_number, cl.first_name AS client_first_name, cl.last_nam...
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 the total number of passengers transported by each vehicle in the last week, along with the vehicle ID.", "sql": null }, { "role": "assistant", "content": "SELECT vehicle_id, SUM(passenger_count) AS total_passengers FROM transportation.trips WHERE 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 narrative_info ( narrative character varying(512) NOT NULL, -- the id of narrative t...
[ { "role": "user", "content": "What is the average ROI for smart money addresses on the Ethereum chain?", "sql": null }, { "role": "assistant", "content": "SELECT AVG(roi) FROM smart_money_token_performance WHERE chain = 'Ethereum';", "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.rooms ( room_id text, property_id text, room_number text, roo...
[ { "role": "user", "content": "Get me a list of all public reviews along with the guest's full name and the staff member who responded, including the overall rating and review date.", "sql": null }, { "role": "assistant", "content": "SELECT rev.review_id,\n g.first_name || ' ' || g.last...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE healthcare.diagnoses ( diagnosis_id text, record_id text, patient_id text, doctor_id...
[ { "role": "user", "content": "Count the number of diagnoses for each unique diagnosis code.", "sql": null }, { "role": "assistant", "content": "SELECT diagnosis_code, COUNT(*) FROM healthcare.diagnoses GROUP BY diagnosis_code;", "sql": null }, { "role": "user", "content": "On...
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, from_address char...
[ { "role": "user", "content": "Find all transactions where the from_address is the same as the to_address, indicating self-transactions, and show the transaction_id, value, and gas_used.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, value, gas_used FROM web3.trans...
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.claim_documents ( document_id character varying(64) NOT NULL, claim_id cha...
[ { "role": "user", "content": "For each claim, retrieve the earliest uploaded document and the latest uploaded document filenames. Return claim_id, earliest_file_name, latest_file_name.", "sql": null }, { "role": "assistant", "content": "SELECT e.claim_id,\n e.file_name AS earliest_file...
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.transactions ( transaction_id character varying(64) NOT NULL, acc...
[ { "role": "user", "content": "List all employees and their managers, showing the full name for both the employee and their manager.", "sql": null }, { "role": "assistant", "content": "SELECT e.first_name || ' ' || e.last_name AS employee_name, m.first_name || ' ' || m.last_name AS manager_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 healthcare.doctors ( doctor_id text, first_name text, last_name text, specialty text...
[ { "role": "user", "content": "For each doctor, count the number of chronic diagnoses they have made. Show the doctor's full name and the count.", "sql": null }, { "role": "assistant", "content": "SELECT doc.first_name, doc.last_name, COUNT(d.diagnosis_id) FROM healthcare.doctors doc JOIN hea...
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 PRIMARY KEY, conversation_id text, sender_us...
[ { "role": "user", "content": "Show all messages that include a media attachment, along with the sender's user ID and the conversation ID.", "sql": null }, { "role": "assistant", "content": "SELECT message_id, sender_user_id, conversation_id, media_url, media_type, sent_at FROM social_media.m...
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 of each case_number and case_name with the total hours spent on each case based on time_entries, but only include cases where the total hours is greater than 10.", "sql": null }, { "role": "assistant", "content": "SELECT c.case_number, c.case_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 government_services.applications ( application_id text PRIMARY KEY, citizen_id text,...
[ { "role": "user", "content": "Find all applications that were submitted in 2023 but received a decision ('Approved' or 'Rejected') in 2024. List the application ID, submitted date, decision date, and status.", "sql": null }, { "role": "assistant", "content": "SELECT application_id, submitted...
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 PRIMARY KEY, username text, email text, p...
[ { "role": "user", "content": "For each developer, show their name and the total number of in-game items in all games they've developed.", "sql": null }, { "role": "assistant", "content": "SELECT d.name AS developer_name,\n COUNT(i.item_id) AS total_items\nFROM gaming_technology.develop...
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 text PRIMARY KEY, license_plate text, vin text,...
[ { "role": "user", "content": "What is the average maintenance cost per service_type for maintenance performed in 2023?", "sql": null }, { "role": "assistant", "content": "SELECT service_type, AVG(cost) AS avg_cost\nFROM transportation.maintenance_logs\nWHERE service_date BETWEEN '2023-01-01'...
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, t...
[ { "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.", "sql": null }, { "role": "assistant", ...
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": "List all law firms that do not have a website registered, including their firm name and phone.", "sql": null }, { "role": "assistant", "content": "SELECT firm_name, phone\nFROM legal_services.law_firms\nWHERE website IS NULL OR website = '';", "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.vehicles ( vehicle_id text, license_plate text, vin text, make text, ...
[ { "role": "user", "content": "List all bookings with the first and last name of the passenger and trip_id.", "sql": null }, { "role": "assistant", "content": "SELECT b.booking_id, b.trip_id, p.first_name, p.last_name\nFROM transportation.bookings b\nJOIN transportation.passengers p ON b.pass...
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.blocks ( block_id character varying(64) NOT NULL, -- unique identifi...
[ { "role": "user", "content": "Show me the average difficulty for blocks that have a previous block versus those that don't have a previous block.", "sql": null }, { "role": "assistant", "content": "SELECT CASE WHEN previous_block_id IS NULL THEN 'No Previous Block' ELSE 'Has Previous Block' ...
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.hashtags ( hashtag_id text, tag_name text, created_at timestamp )
[ { "role": "user", "content": "Show me all hashtag IDs and their tag names that were created after June 10, 2024 and whose tag names contain the word 'dev'.", "sql": null }, { "role": "assistant", "content": "SELECT hashtag_id, tag_name FROM social_media.hashtags WHERE created_at > '2024-06-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 text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List the full names and email addresses of users who have liked any comment.", "sql": null }, { "role": "assistant", "content": "SELECT DISTINCT u.full_name, u.email\nFROM social_media.users u\nJOIN social_media.likes l ON u.user_id = l.user_id\nWHERE l.comment_...
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.claim_documents ( document_id character varying(64) NOT NULL, claim_id cha...
[ { "role": "user", "content": "List all claim IDs that have both an 'Accident Report' and a 'Damage Assessment' document type.", "sql": null }, { "role": "assistant", "content": "SELECT claim_id\nFROM insurance.claim_documents\nWHERE document_type IN ('Accident Report', 'Damage Assessment')\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.lawyers ( lawyer_id.text, first_name.text, last_name.text, bar_number...
[ { "role": "user", "content": "List the full name (first and last) and specialization of all lawyers who work for law firms founded before the year 2000.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T1.specialization FROM lawyers AS T1 JOIN law_firms...
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, -- unique id...
[ { "role": "user", "content": "List the first name, last name, and the name of the law firm for all lawyers.", "sql": null }, { "role": "assistant", "content": "SELECT T1.first_name, T1.last_name, T2.firm_name FROM lawyers AS T1 JOIN law_firms AS T2 ON T1.firm_id = T2.firm_id", "sql": nul...
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": "How many distinct fundraising round names are recorded in the table?", "sql": null }, { "role": "assistant", "content": "SELECT COUNT(DISTINCT rounds_name) FROM project_fundraising_record;", "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.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "Which games have achievements where the points value is exactly 0? List the game title and the achievement name.", "sql": null }, { "role": "assistant", "content": "SELECT g.title AS game_title, a.name AS achievement_name\nFROM gaming_technology.achievements a\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 web3.contracts ( contract_id character varying(64) NOT NULL, address character varyi...
[ { "role": "user", "content": "Show each token's symbol, token_name, and the deployer_address and status of the contract where that token was created.", "sql": null }, { "role": "assistant", "content": "SELECT t.token_symbol,\n t.token_name,\n c.deployer_address,\n c.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 insurance.claims ( claim_id.text, policy_id.text, customer_id.text, incident_date.ti...
[ { "role": "user", "content": "List the payment ID, amount paid, and due date for all premium payments with a status of 'overdue'.", "sql": null }, { "role": "assistant", "content": "SELECT payment_id, amount_paid, due_date FROM premium_payments WHERE status = 'overdue'", "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.claim_documents ( document_id text PRIMARY KEY, claim_id text, document_ty...
[ { "role": "user", "content": "List all document IDs, file names, and uploaded timestamps for documents that were uploaded on a weekend.", "sql": null }, { "role": "assistant", "content": "SELECT document_id, file_name, uploaded_at FROM insurance.claim_documents WHERE EXTRACT(DOW FROM uploade...
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": "Show me all cancelled trips along with their scheduled departure times and route IDs.", "sql": null }, { "role": "assistant", "content": "SELECT trip_id, route_id, scheduled_departure FROM transportation.trips WHERE status = 'cancelled';", "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 token_metas ( block_timestamp timestamp, block_number bigint, transaction_hash varch...
[ { "role": "user", "content": "List all SUI coins with status 'exists', including their coin_type, balance, and owner address.", "sql": null }, { "role": "assistant", "content": "SELECT object_id, coin_type, balance, owner\nFROM sui_coins\nWHERE status = 'exists';", "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 financial_services.customers ( customer_id.text, first_name.text, last_name.text, da...
[ { "role": "user", "content": "List the number of completed transactions and the total amount per currency.", "sql": null }, { "role": "assistant", "content": "SELECT currency, COUNT(*) AS transaction_count, SUM(amount) AS total_amount\nFROM financial_services.transactions\nWHERE status = '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 transportation.routes ( route_id text, route_number text, description text, origin_l...
[ { "role": "user", "content": "List pairs of distinct routes that originate from the same location but go to different destinations. Show the route ID and route number for both routes and the common origin location ID.", "sql": null }, { "role": "assistant", "content": "SELECT\n r1.route_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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), -...
[ { "role": "user", "content": "Which developers have been founded before 2005? Show their name and country.", "sql": null }, { "role": "assistant", "content": "SELECT name, country\nFROM gaming_technology.developers\nWHERE founded_year < 2005;", "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 government_services.payments ( payment_id text, application_id text, citizen_id text...
[ { "role": "user", "content": "How many payments have been made using each payment_method, and what is the total amount for each method?", "sql": null }, { "role": "assistant", "content": "SELECT payment_method, COUNT(*) AS payment_count, SUM(amount) AS total_amount\nFROM government_services....
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.fuel_logs ( fuel_log_id character varying(64) NOT NULL, -- uniqu...
[ { "role": "user", "content": "Show all fuel logs for vehicle_id 'VH123', including the timestamp, fuel type, quantity, and the location_id. Sort the list by timestamp descending.", "sql": null }, { "role": "assistant", "content": "SELECT fuel_log_id, log_timestamp, fuel_type, quantity, locat...
You are an expert in writing database language. You can write a corresponding database language query to answer the user's question based on the table structure described by the table creation statement. ##Table Structure CREATE TABLE hospitality_technology.service_orders ( order_id text PRIMARY KEY, reservation_id te...
[ { "role": "user", "content": "Show me the total quantity and total revenue for each service, along with the number of unique guests who ordered each service.", "sql": null }, { "role": "assistant", "content": "SELECT service_id, SUM(quantity) AS total_quantity, SUM(total_price) AS total_reve...
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 citizens have scheduled appointments for services in the 'Benefits' category? Please show the first name and last name of the citizen, as well as the name of the service.", "sql": null }, { "role": "assistant", "content": "SELECT c.first_name, c.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 gaming_technology.players ( player_id uuid NOT NULL DEFAULT gen_random_uuid(), usern...
[ { "role": "user", "content": "I want the number of achievements unlocked per country_code by active players, showing only countries with at least 100 unlocks.", "sql": null }, { "role": "assistant", "content": "SELECT p.country_code, COUNT(*) AS unlock_count\nFROM gaming_technology.players 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.agencies ( agency_id character varying(64) NOT NULL, -- uniq...
[ { "role": "user", "content": "List the agency names and addresses for all service locations in the state of 'Florida'.", "sql": null }, { "role": "assistant", "content": "SELECT a.agency_name, l.address\nFROM government_services.service_locations l\nJOIN government_services.agencies a ON l.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 blockchain.blocks ( block_id text PRIMARY KEY, previous_block_id text, timestamp tim...
[ { "role": "user", "content": "Show me all addresses that have created smart contracts, along with their balance and the count of contracts they've created.", "sql": null }, { "role": "assistant", "content": "SELECT a.address_id, a.balance, COUNT(sc.contract_id) AS contract_count FROM blockch...
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": "List scheduled appointments, including the patient's full name, the doctor's full name, and the appointment time.", "sql": null }, { "role": "assistant", "content": "SELECT p.first_name, p.last_name, d.first_name, d.last_name, a.appointment_time FROM healthcare....
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 PRIMARY KEY, first_name text, last_nam...
[ { "role": "user", "content": "Show me all guests from 'CA' along with their full name and email address.", "sql": null }, { "role": "assistant", "content": "SELECT guest_id, CONCAT(first_name, ' ', last_name) AS full_name, email FROM hospitality_technology.guests WHERE country_code = 'CA';",...
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.platforms ( platform_id character varying(64) NOT NULL,...
[ { "role": "user", "content": "Can you help me find all staff members assigned to a specific station with station_id 'STATION_002', along with their roles and the platform details at that station?", "sql": null }, { "role": "assistant", "content": "SELECT s.staff_id, s.first_name, s.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 insurance.policy_beneficiaries ( beneficiary_id text, policy_id text, customer_id te...
[ { "role": "user", "content": "List all beneficiaries who have a relationship of 'Parent' and a percentage_share less than 25%. Show their beneficiary_id, first_name, last_name, relationship, and percentage_share.", "sql": null }, { "role": "assistant", "content": "SELECT beneficiary_id, firs...
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.transactions ( transaction_id text PRIMARY KEY, account_id text, ...
[ { "role": "user", "content": "Show me all transactions along with the related account IDs where the transaction type is 'Transfer'.", "sql": null }, { "role": "assistant", "content": "SELECT transaction_id, account_id, related_account_id, transaction_type, amount, currency, transaction_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 social_media.users ( user_id text, username text, email text, password_hash text, fu...
[ { "role": "user", "content": "List the usernames of users who have created posts associated with any hashtag, and the name of the hashtag.", "sql": null }, { "role": "assistant", "content": "SELECT\n u.username,\n h.tag_name\nFROM social_media.users AS u\nJOIN social_media.posts AS p\n ON...
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.hashtags ( hashtag_id.text, tag_name.text, created_at.timestamp ) CREAT...
[ { "role": "user", "content": "How many notifications are there for each distinct notification type?", "sql": null }, { "role": "assistant", "content": "SELECT notification_type, COUNT(*) FROM social_media.notifications GROUP BY notification_type;", "sql": null } ]