title: Converting dates to periods - last saturday of each month sql
body: <p>Not a strong SQL user by any means. I'm trying to run a script that will return the fiscal period given the date of the transaction. The fiscal period is up to the last saturday of each month.</p>
  <p>So for the year 2022, period 1 January would be Jan 1, 2022 to Jan 29,2022 (last saturday) and Feb would be Jan 30th to Feb 26, 2022 (last saturday). I need to run this script for multiple years.</p>