This stored procedure, is executed by an SQL agent every hour, which checks certain account groups for any Nett Movement between their creation date and demotion date, and if they meet the criteria the account is elvated to a new tier like
Silver
Gold
Platinum
This also set a Custom number field because the client wanted the moving between two tiers to be inclusive.
The script also set a customtext field to highlight where the account was elevated from.
Lastly it updates the expiry date, if the account has no movement for 1 year then it will be moved back into the Bronze Tier.