Question

Function LAST

  • 15 September 2021
  • 0 replies
  • 4 views

Hello,

Do we have any “LAST” function? The following query is not working, and I want to extract the last limit in each month from each acoount ID .

 

SELECT 
date_trunc(date, month) as Month,
LAST(credit_card_account__limit_range_max) as Credit_Limit

FROM core.credit_card_account_daily_snapshot

GROUP BY Month, account__id
ORDER BY Month


0 replies

Be the first to reply!

Reply