How would you write a query to find the first and last transaction for each customer in Applied Data Finance data?