SELECT
AVG(value) AS avg_value,
CASE LOWER(TO_CHAR(created_date, 'Day'))
WHEN 'monday' THEN 'Понедельник'
WHEN 'tuesday' THEN 'Вторник'
WHEN 'wednesday' THEN 'Среда'
WHEN 'thursday' THEN 'Четверг'
WHEN 'friday' THEN 'Пятница'
WHEN 'saturday' THEN 'Суббота'
WHEN 'sunday' THEN 'Воскресенье'
END week
FROM results
GROUP BY created_date;
Day full capitalized day name (blank-padded to 9 chars)
'monday' = 'monday '
SELECT
AVG(value) AS avg_value,
CASE WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'monday' THEN 'Понедельник'
WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'tuesday' THEN 'Вторник'
WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'wednesday' THEN 'Среда'
WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'thursday' THEN 'Четверг'
WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'friday' THEN 'Пятница'
WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'saturday' THEN 'Суббота'
WHEN LOWER(TO_CHAR(created_date, 'Day')) = 'sunday' THEN 'Воскресенье'
END week
FROM results
GROUP BY created_date;