Use Atlantic;
GO
SELECT *
FROM dbo.udf_Customer_Purchase_Details('Chen')

Use Atlantic;
GO
SELECT customer_id
, cust_full_name
, COUNT(customer_id) AS nbr_orders
FROM dbo.udf_Customer_Purchase_Details('Chen')
GROUP BY customer_id, cust_full_name
ORDER BY customer_id;