Marketing, Analytics, Marketing Analytics, Data Analytics, Digital Marketing.
grouping the transactions by customer ID and using the MIN function. This SQL function gives you the been the lowest value in the selected column, in this case, the least amount of days since last transaction. Your SQL command may look like this: SELECT customer_id, MIN(DaysSinceTransaction) FROM