Database: bakery_1
Question: Give the last names of customers who have been to the bakery more than 10 times?
SQL:
SELECT T2.LastName FROM receipts AS T1 JOIN customers AS T2 ON T1.CustomerId  =  T2.id GROUP BY T2.id HAVING count(*)  >  10