No, that wouldn't work. I am returning a table, and only some rows in this table might have multiple records, from which i need to select the most recent one.
I am thinking I need to use having clause after my group by, but not sure how. something like
having max(purchaseDate)