SQL Function Reference

DAYOFWEEK
Returns the ordinal number of the day in the week (from 1 to 7), starting from Sunday
MySQL
DAYOFWEEK(datetime)
Examples
MySQL
SELECT DAYOFWEEK("2022-06-16");