I'm new to SQL and was just wondering how to get the previous weekday in PostgreSQL. I have select (current_date - 1) to get yesterday's date but I need this to exclude weekends. So for example, if today is Monday then I would expect this query to get Friday's date.