我希望MXD查询获得相对于三维的二维平均值。
结果应类似于查询下面列出的SQL查询。
with cte (region,monthyear,avg_qty)
(select region,monthyear, avg(qty)
from salesorder
group by region,monthyear where txn_type='online' )
select userid,qty,cte.avg_qty from salesorder m join cte on cte.monthyear=m.monthyear and cte.region=m.region
where month(orderdate)='JAN'