I have only been playing around with SQL for a couple of weeks, and very casually at that. So this is probably a super simple question. For ease of conveying it i have limited the script i have to only relevant data
SELECT
ASSET_MAIN_NUMBER,
FISCAL_YEAR_PERIOD,
SEQUENCE_NUMBER_IN_THE_PERIOD
FROM
valuetable
WHERE
assetnumber = 123
AND FISCAL_YEAR_PERIOD = 2021003
the assetnumber will have multiple records within 2021003, noted by the sequence number field (1, 2, 3, 4, etc). How can i limit this to only return the highest numerical value from the sequence field? The values wont always be in order either, as with this example i have records for 01, 03, and 04.
Thank you!