Database: bakery_1
Question: What are the receipt numbers for which either an apple flavor pie was purchased or the customer with id 12 shopped?
SQL:
SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Apple" AND T2.food  =  "Pie" UNION SELECT ReceiptNumber FROM receipts WHERE CustomerId  =  12