How do I find the first day of the current week with SQL?

Have you ever had to do weekly/monthly reporting based on SQL data retrieval? It would be pretty neat if you could get the start date of the current week/month dynamically, no? Well, there's a very straightforward way if you're using Vertica or PostgreSQL - just employ the date_trunc('period', timestamp) function. Other databases (e.g. SQL Server,  MySQL) … Continue reading How do I find the first day of the current week with SQL?