sql function get last day of week code example
Example 1: sql select data from last week
select id from tbname
where date between date_sub(now(),INTERVAL 1 WEEK) and now();
Example 2: get week day from date in sql
SELECT TO_CHAR(your_table.date_colunm, 'DAY')
FROM your_table;