使用下面提到的代码,但是得到叉号说明错误的语法
create table bajaj1 as (
select `Date`, `ClosePrice`
row_number() over(order by `Date` as `Row_num`,
Avg(`ClosePrice`) over(order by `Date` rows 19 preceding) as `20 Day MA`,
Avg(`ClosePrice`) over(order by `Date` rows 49 preceding) as `20 Day MA`
from `bajaj auto`
);
此处使用表“ bajaj auto”的日期和closePrice创建新表“ bajaj1”。使用mySql-8.0.13版本