Counting Active Transactions in SQL: Issues with Status Logic in Time Series Data
I am trying to create a SQL query to count active transactions month by month from a transaction_status table. Each transaction_id can have multiple statuses, with two key statuses: ENDORSEMENT_SUCCESS (when the transaction is active) and ENDORSEMENT_CLOSED_SUCCESS (when the transaction is closed). Problem: The challenge I’m facing is ensuring that: A transaction should only be