Which staff handled least number of payments? List the full name and the id.
CREATE TABLE payment (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, last_name VARCHAR, staff_id VARCHAR)
SELECT TOP 1 T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*)
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE payment (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, last_name VARCHAR, staff_id VARCHAR) Question: Which staff handled least number of payments? List the full name and the id. [/INST] SELECT TOP 1 T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) </s>