target-benchmark/spider-queries huggingface dataset:
Database: cre_Doc_Workflow (tables: documents, documents_processes)
Question: Show all document ids without a process.
SQL: SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_processes
Database: cre_Doc_Workflow (tables: business_processes, documents_processes)
Question: List all process ids with no document.
SQL: SELECT process_id FROM Business_processes EXCEPT SELECT process_id FROM Documents_processes
Database: cre_Doc_Workflow (tables: process_status, documents_processes, process_outcomes)
Question: What is the process outcome description and process status description for the document with id 0?
SQL: SELECT T2.process_outcome_description ,  T3.process_status_description FROM Documents_processes AS T1 JOIN Process_outcomes AS T2 ON T1.process_outcome_code  =  T2.process_outcome_code JOIN Process_Status AS T3 ON T1.process_status_code  =  T3.process_status_code WHERE T1.document_id  =  0
Database: cre_Doc_Workflow (tables: business_processes, documents, documents_processes)
Question: What is the process name for the document "Travel to Brazil"?
SQL: SELECT T3.process_name FROM Documents_processes AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id JOIN Business_processes AS T3 ON T1.process_id  =  T3.process_id WHERE T2.document_name  =  "Travel to Brazil"
Database: cre_Doc_Workflow (tables: documents_processes)
Question: Show all process ids and the number of documents in each process.
SQL: SELECT process_id ,  count(*) FROM Documents_processes GROUP BY process_id
Database: cre_Doc_Workflow (tables: staff_in_processes)
Question: How many staff are the document with id 0 and process with id 9.
SQL: SELECT count(*) FROM Staff_in_processes WHERE document_id  =  0 AND process_id  =  9
Database: cre_Doc_Workflow (tables: staff_in_processes)
Question: Show all staff ids and the number of document processes for each staff.
SQL: SELECT staff_id ,  count(*) FROM Staff_in_processes GROUP BY staff_id
Database: cre_Doc_Workflow (tables: staff_in_processes)
Question: Show all staff role codes and the number of document processes for each role.
SQL: SELECT staff_role_code ,  count(*) FROM Staff_in_processes GROUP BY staff_role_code
Database: cre_Doc_Workflow (tables: staff_in_processes)
Question: How many different roles does the staff with id 3 have?
SQL: SELECT count(DISTINCT staff_role_code) FROM Staff_in_processes WHERE staff_id  =  3
Database: advertising_agencies (tables: agencies)
Question: How many agencies do we have?
SQL: SELECT count(*) FROM Agencies
Database: advertising_agencies (tables: agencies)
Question: Count the number of agencies.
SQL: SELECT count(*) FROM Agencies
Database: advertising_agencies (tables: agencies)
Question: Show all agency ids and details.
SQL: SELECT agency_id ,  agency_details FROM Agencies
Database: advertising_agencies (tables: agencies)
Question: What are all the agency ids and details?
SQL: SELECT agency_id ,  agency_details FROM Agencies
Database: advertising_agencies (tables: clients)
Question: Show the number of clients.
SQL: SELECT count(*) FROM Clients
Database: advertising_agencies (tables: clients)
Question: How many clients are there?
SQL: SELECT count(*) FROM Clients
Database: advertising_agencies (tables: clients)
Question: List all client ids and client details.
SQL: SELECT client_id ,  client_details FROM Clients
Database: advertising_agencies (tables: clients)
Question: What are all the client ids and details?
SQL: SELECT client_id ,  client_details FROM Clients
Database: advertising_agencies (tables: clients)
Question: Show agency ids and the number of clients for each agency.
SQL: SELECT agency_id ,  count(*) FROM Clients GROUP BY agency_id
Database: advertising_agencies (tables: clients)
Question: How many clients does each agency have?
SQL: SELECT agency_id ,  count(*) FROM Clients GROUP BY agency_id
Database: advertising_agencies (tables: agencies, clients)
Question: What is the agency id and details with most number of clients?
SQL: SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: agencies, clients)
Question: Return the agency id and details for the agency with the greatest number of clients.
SQL: SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: agencies, clients)
Question: Show agency ids and details with at least 2 clients.
SQL: SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id HAVING count(*)  >=  2
Database: advertising_agencies (tables: agencies, clients)
Question: What are the agency ids and details agencies with at least 2 clients?
SQL: SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id HAVING count(*)  >=  2
Database: advertising_agencies (tables: agencies, clients)
Question: Show agency details for client with detail 'Mac'.
SQL: SELECT T2.agency_details FROM Clients AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id WHERE T1.client_details  =  'Mac'
Database: advertising_agencies (tables: agencies, clients)
Question: What are the agency details for clients with the detail Mac?
SQL: SELECT T2.agency_details FROM Clients AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id WHERE T1.client_details  =  'Mac'
Database: advertising_agencies (tables: agencies, clients)
Question: Show details for all clients and the details of their corresponding agents.
SQL: SELECT T1.client_details ,  T2.agency_details FROM Clients AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id
Database: advertising_agencies (tables: agencies, clients)
Question: What are the client details for each client and the corresponding details of their agencies?
SQL: SELECT T1.client_details ,  T2.agency_details FROM Clients AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id
Database: advertising_agencies (tables: clients)
Question: Show all sic codes and the number of clients with each code.
SQL: SELECT sic_code ,  count(*) FROM Clients GROUP BY sic_code
Database: advertising_agencies (tables: clients)
Question: How many clients are there for each sic code?
SQL: SELECT sic_code ,  count(*) FROM Clients GROUP BY sic_code
Database: advertising_agencies (tables: clients)
Question: Show all client ids and details with sic code "Bad".
SQL: SELECT client_id ,  client_details FROM Clients WHERE sic_code  =  "Bad";
Database: advertising_agencies (tables: clients)
Question: What are the client ideas and details for clients with the sic code Bad?
SQL: SELECT client_id ,  client_details FROM Clients WHERE sic_code  =  "Bad";
Database: advertising_agencies (tables: agencies, clients)
Question: Show all agency ids and details for agencies with a client.
SQL: SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id
Database: advertising_agencies (tables: agencies, clients)
Question: What are the agency ids and agency details for all agencies who have a client?
SQL: SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id
Database: advertising_agencies (tables: agencies, clients)
Question: Show all agency ids without any client.
SQL: SELECT agency_id FROM Agencies EXCEPT SELECT agency_id FROM Clients
Database: advertising_agencies (tables: agencies, clients)
Question: What are ids of agencies that do not have any clients?
SQL: SELECT agency_id FROM Agencies EXCEPT SELECT agency_id FROM Clients
Database: advertising_agencies (tables: invoices)
Question: How many invoices do we have?
SQL: SELECT count(*) FROM Invoices
Database: advertising_agencies (tables: invoices)
Question: Count the number of invoices.
SQL: SELECT count(*) FROM Invoices
Database: advertising_agencies (tables: invoices)
Question: Show ids, status codes, and details for all invoices for clients.
SQL: SELECT invoice_id ,  invoice_status ,  invoice_details FROM Invoices
Database: advertising_agencies (tables: invoices)
Question: What are the ids, statuses, and details for all invoices?
SQL: SELECT invoice_id ,  invoice_status ,  invoice_details FROM Invoices
Database: advertising_agencies (tables: invoices)
Question: Show all client ids and the number of invoices for each client.
SQL: SELECT client_id ,  count(*) FROM Invoices GROUP BY client_id
Database: advertising_agencies (tables: invoices)
Question: How many invoices are there for each client id?
SQL: SELECT client_id ,  count(*) FROM Invoices GROUP BY client_id
Database: advertising_agencies (tables: clients, invoices)
Question: List the client id and detail with most number of invoices.
SQL: SELECT T1.client_id ,  T2.client_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: clients, invoices)
Question: What are the client id and details for the client with the most invoices?
SQL: SELECT T1.client_id ,  T2.client_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: invoices)
Question: What are client ids for clients with at least 2 invoices.
SQL: SELECT client_id FROM Invoices GROUP BY client_id HAVING count(*)  >=  2
Database: advertising_agencies (tables: invoices)
Question: Return the client ids for clients with two or more invoices?
SQL: SELECT client_id FROM Invoices GROUP BY client_id HAVING count(*)  >=  2
Database: advertising_agencies (tables: invoices)
Question: Show all invoice status codes and the number of invoices with each status.
SQL: SELECT invoice_status ,  count(*) FROM Invoices GROUP BY invoice_status
Database: advertising_agencies (tables: invoices)
Question: How many invoices are there for each status code?
SQL: SELECT invoice_status ,  count(*) FROM Invoices GROUP BY invoice_status
Database: advertising_agencies (tables: invoices)
Question: What is the invoice status code with most number of invoices.
SQL: SELECT invoice_status FROM Invoices GROUP BY invoice_status ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: invoices)
Question: Return the invoice status that has the most invoices.
SQL: SELECT invoice_status FROM Invoices GROUP BY invoice_status ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: agencies, clients, invoices)
Question: Show all invoice status codes and details and the corresponding client id and details and agency id and details.
SQL: SELECT T1.invoice_status ,  T1.invoice_details ,  T2.client_id ,  T2.client_details ,  T3.agency_id ,  T3.agency_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id JOIN Agencies AS T3 ON T2.agency_id  =  T3.agency_id
Database: advertising_agencies (tables: agencies, clients, invoices)
Question: What are the invoice status, invoice details, and corresponding client ids and details and agency id and details?
SQL: SELECT T1.invoice_status ,  T1.invoice_details ,  T2.client_id ,  T2.client_details ,  T3.agency_id ,  T3.agency_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id JOIN Agencies AS T3 ON T2.agency_id  =  T3.agency_id
Database: advertising_agencies (tables: meetings)
Question: List all meeting type codes and details.
SQL: SELECT meeting_type ,  other_details FROM meetings
Database: advertising_agencies (tables: meetings)
Question: What are all meeting types and other details?
SQL: SELECT meeting_type ,  other_details FROM meetings
Database: advertising_agencies (tables: meetings)
Question: Show all meeting outcomes and purposes.
SQL: SELECT meeting_outcome ,  purpose_of_meeting FROM meetings
Database: advertising_agencies (tables: meetings)
Question: What are all meeting outcomes and purposes?
SQL: SELECT meeting_outcome ,  purpose_of_meeting FROM meetings
Database: advertising_agencies (tables: invoices, payments)
Question: Show all payment ids and details for invoices whose status is 'Working'.
SQL: SELECT T1.payment_id ,  T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id WHERE T2.invoice_status  =  'Working'
Database: advertising_agencies (tables: invoices, payments)
Question: What are all payment ids and payment details for invoices with status Working?
SQL: SELECT T1.payment_id ,  T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id WHERE T2.invoice_status  =  'Working'
Database: advertising_agencies (tables: payments, invoices)
Question: Show all invoice ids and statuses without a payment.
SQL: SELECT invoice_id ,  invoice_status FROM Invoices EXCEPT SELECT T1.invoice_id ,  T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id  =  T2.invoice_id
Database: advertising_agencies (tables: payments, invoices)
Question: What are the invoice ids and statuses for invoices without a payment?
SQL: SELECT invoice_id ,  invoice_status FROM Invoices EXCEPT SELECT T1.invoice_id ,  T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id  =  T2.invoice_id
Database: advertising_agencies (tables: payments)
Question: How many payments do we have?
SQL: SELECT count(*) FROM Payments
Database: advertising_agencies (tables: payments)
Question: Count the number of payments.
SQL: SELECT count(*) FROM Payments
Database: advertising_agencies (tables: payments)
Question: List all payment ids and its corresponding invoice ids and details.
SQL: SELECT payment_id ,  invoice_id ,  payment_details FROM Payments
Database: advertising_agencies (tables: payments)
Question: What are the payment ids, invoice ids, and payment details for all payments?
SQL: SELECT payment_id ,  invoice_id ,  payment_details FROM Payments
Database: advertising_agencies (tables: payments, invoices)
Question: Show all the different invoice ids and statuses of the payments
SQL: SELECT DISTINCT T1.invoice_id ,  T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id  =  T2.invoice_id
Database: advertising_agencies (tables: payments, invoices)
Question: What are the distinct invoice ids and statuses for all payments?
SQL: SELECT DISTINCT T1.invoice_id ,  T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id  =  T2.invoice_id
Database: advertising_agencies (tables: payments)
Question: Show all invoice ids and the number of payments for each invoice.
SQL: SELECT invoice_id ,  count(*) FROM Payments GROUP BY invoice_id
Database: advertising_agencies (tables: payments)
Question: How many payments are there for each invoice?
SQL: SELECT invoice_id ,  count(*) FROM Payments GROUP BY invoice_id
Database: advertising_agencies (tables: invoices, payments)
Question: What is the invoice id, status code, and details for the invoice with most number of payments.
SQL: SELECT T1.invoice_id ,  T2.invoice_status ,  T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id GROUP BY T1.invoice_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: invoices, payments)
Question: Return the invoice ids, statuses, and details for invoices with the most payments?
SQL: SELECT T1.invoice_id ,  T2.invoice_status ,  T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id GROUP BY T1.invoice_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: staff)
Question: How many staff do we have?
SQL: SELECT count(*) FROM Staff
Database: advertising_agencies (tables: staff)
Question: Count the number of staff.
SQL: SELECT count(*) FROM Staff
Database: advertising_agencies (tables: staff)
Question: Show the agency ids and the number of staff in each agent?
SQL: SELECT agency_id ,  count(*) FROM Staff GROUP BY agency_id
Database: advertising_agencies (tables: staff)
Question: Return the agency ids and number of staff in each.
SQL: SELECT agency_id ,  count(*) FROM Staff GROUP BY agency_id
Database: advertising_agencies (tables: agencies, staff)
Question: What is the agent id and details for the agency with most staff?
SQL: SELECT T1.agency_id ,  T2.agency_details FROM Staff AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: agencies, staff)
Question: Return the id and detail for the agency with the most staff.
SQL: SELECT T1.agency_id ,  T2.agency_details FROM Staff AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id ORDER BY count(*) DESC LIMIT 1
Database: advertising_agencies (tables: meetings)
Question: Show meeting outcome codes and the number of meeting in each outcome.
SQL: SELECT meeting_outcome ,  count(*) FROM Meetings GROUP BY meeting_outcome
Database: advertising_agencies (tables: meetings)
Question: How many meetings had each meeting outcome?
SQL: SELECT meeting_outcome ,  count(*) FROM Meetings GROUP BY meeting_outcome
Database: advertising_agencies (tables: meetings)
Question: List the client ids and the number of meeting for each client.
SQL: SELECT client_id ,  count(*) FROM Meetings GROUP BY client_id
Database: advertising_agencies (tables: meetings)
Question: How many meetings are there for each client id?
SQL: SELECT client_id ,  count(*) FROM Meetings GROUP BY client_id
Database: advertising_agencies (tables: meetings)
Question: Show the meeting type codes and the number of meeting for each client.
SQL: SELECT meeting_type ,  count(*) FROM Meetings GROUP BY meeting_type
Database: advertising_agencies (tables: meetings)
Question: How many meetings are there for each meeting type?
SQL: SELECT meeting_type ,  count(*) FROM Meetings GROUP BY meeting_type
Database: advertising_agencies (tables: meetings, clients)
Question: Show all meeting ids, meeting outcomes, meeting types and the details of the client atttending it.
SQL: SELECT T1.meeting_id ,  T1.meeting_outcome ,  T1.meeting_type ,  T2.client_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id
Database: advertising_agencies (tables: meetings, clients)
Question: What are the meeting ids, meeting outcomes, meeting types, and client details for all meetings?
SQL: SELECT T1.meeting_id ,  T1.meeting_outcome ,  T1.meeting_type ,  T2.client_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id
Database: advertising_agencies (tables: staff_in_meetings)
Question: Show the meeting ids and the number of staff in each meeting.
SQL: SELECT meeting_id ,  count(*) FROM Staff_in_meetings GROUP BY meeting_id
Database: advertising_agencies (tables: staff_in_meetings)
Question: Count the number of staff in each meeting by meeting id.
SQL: SELECT meeting_id ,  count(*) FROM Staff_in_meetings GROUP BY meeting_id
Database: advertising_agencies (tables: staff_in_meetings)
Question: Show the staff id and the number of meetings attended by the staff who attended some meeting but had the lowest attendance.
SQL: SELECT staff_id ,  count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;
Database: advertising_agencies (tables: staff_in_meetings)
Question: What is the staff id of the staff who attended the least meetings but attended some meeting?
SQL: SELECT staff_id ,  count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;
Database: advertising_agencies (tables: staff_in_meetings)
Question: How many staff have attended a meeting?
SQL: SELECT count(DISTINCT staff_id) FROM Staff_in_meetings
Database: advertising_agencies (tables: staff_in_meetings)
Question: Return the number of distinct staff who have attended a meeting?
SQL: SELECT count(DISTINCT staff_id) FROM Staff_in_meetings
Database: advertising_agencies (tables: staff, staff_in_meetings)
Question: How many staff did not attend any meeting?
SQL: SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings )
Database: advertising_agencies (tables: staff, staff_in_meetings)
Question: Count the number of staff who did not attend any meeting.
SQL: SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings )
Database: advertising_agencies (tables: clients, invoices, meetings)
Question: What are the ids and details of the clients who have attended any meeting or have any invoice?
SQL: SELECT T1.client_id ,  T1.client_details FROM Clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id UNION SELECT T1.client_id ,  T1.client_details FROM Clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id
Database: advertising_agencies (tables: clients, invoices, meetings)
Question: Return the ids and details of clients who have attended a meeting or had an invoice.
SQL: SELECT T1.client_id ,  T1.client_details FROM Clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id UNION SELECT T1.client_id ,  T1.client_details FROM Clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id
Database: advertising_agencies (tables: staff)
Question: What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's'?
SQL: SELECT staff_id ,  staff_details FROM staff WHERE staff_details LIKE "%s%" GROUP BY staff_id HAVING count(*)  >=  1
Database: advertising_agencies (tables: staff)
Question: Return the ids and details of staff who have attended at least 1 meeting and have an s in their staff details?
SQL: SELECT staff_id ,  staff_details FROM staff WHERE staff_details LIKE "%s%" GROUP BY staff_id HAVING count(*)  >=  1
Database: advertising_agencies (tables: meetings, invoices, clients)
Question: What are the id, sic code and agency id of the client who has attended 1 meeting and has any invoice.
SQL: SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id HAVING count(*)  =  1 INTERSECT SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id
Database: advertising_agencies (tables: meetings, invoices, clients)
Question: Return the ids, sic codes, and agency ids of clients who have attended 1 meeting and had an invoice.
SQL: SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id HAVING count(*)  =  1 INTERSECT SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id
Database: advertising_agencies (tables: meetings, staff_in_meetings, clients, staff)
Question: List the start time, end time of each meeting, and the corresponding client detail and staff detail.
SQL: SELECT T1.start_date_time ,  T1.end_date_time ,  T2.client_details ,  T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id  =  T3.meeting_id JOIN staff AS T4 ON T3.staff_id  =  T4.staff_id
Database: advertising_agencies (tables: meetings, staff_in_meetings, clients, staff)
Question: What are the start and end times of each meeting, as well as the corresponding client and staff details the attendees?
SQL: SELECT T1.start_date_time ,  T1.end_date_time ,  T2.client_details ,  T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id  =  T3.meeting_id JOIN staff AS T4 ON T3.staff_id  =  T4.staff_id