select concat('W',w.weeksNO, '2022') ,
w.weeksNO,w.orderscount,w.salesRMB
from(
select
substring(DATE_FORMAT(riqi_pay, '%Y%u'), 5, 2) weeksNO,
count(riqi_pay) orderscount ,
round(sum(money)) salesRMB
from s001.order_tb
where DATE_FORMAT(riqi_pay,'%Y%m') >= 202201
and type='2'
group by weeksNO) w