The technique you are looking for is called "pivoting" - it's not so easy in MySQL as others but there is a worked example here -
Pivot Tables in MySQL[
^]
To get your results exactly as you have shown them you will need to use IFNULL -
MySQL :: MySQL 5.7 Reference Manual :: 12.5 Flow Control Functions[
^]
Your expected results are mixing types 'E', 'M', 'N' then 0 (zero) so you will need to use something like
IFNULL(`2022-08-02`,'0')
etc i.e. the character '0' not the numeric 0