I have a table t1 with the columns : TRANSACTION_ID,USER_ID,MERCHANT_NAME,TRANSACTION_DATE,AMOUNT
a) Write a query to find the first merchant a user transacts on
b) Write a query to find the last merchant a user transacts on
I tried the following query which should work for a)
select USER_ID,MERCHANT_NAME,Min(Bill_Date) from t1
Group by customer_id