MySQL Function Reference

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