Did you reading/answer the old post instead of opening a new one?
Why do you use a very old version, 12.0.0.03, which is definitely no production system?
dayofweek is based on a week starting on sunday not monday, you have to adjust your logic based on this (i already posted a SQL UDF with a calculation to get a begin of a week based on ISO).
As i wrote, since 13.10 you could easily do a SQL UDF and for 14 there's a DAYNUMBER_OF_WEEK:
SELECT current_date as d,
d - DAYNUMBER_OF_WEEK(d,'iso'),
d - d-((dayofweek(d) + 5) MOD 7 + 1)
Did you reading/answer the old post instead of opening a new one?
Why do you use a very old version, 12.0.0.03, which is definitely no production system?
dayofweek is based on a week starting on sunday not monday, you have to adjust your logic based on this (i already posted a SQL UDF with a calculation to get a begin of a week based on ISO).
As i wrote, since 13.10 you could easily do a SQL UDF and for 14 there's a DAYNUMBER_OF_WEEK: