Created
October 31, 2025 15:06
-
-
Save ahouts/b7cd6f6970b8e592984364c5e26c5e99 to your computer and use it in GitHub Desktop.
Selecting the most recent fee trade for a portfolio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT id | |
| FROM trades | |
| WHERE portfolio_id = :portfolio_id | |
| AND type = 'fee' | |
| ORDER BY date DESC | |
| LIMIT 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment