title: How to do I get the max day of each month in sql/snowflake
body: <p>I’m trying to return The max day of each month from a data set. I say max because it’s based on mon-fri uploads. So if the last day of the month falls on a Saturday(say 10/31/2019) then the last uploaded date will be on the Friday (10/30/2019). </p>
  
  <p>I’ve tried select max(date) from my_table group by datepart(‘month’,date);</p>