You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AQuery/moving_avg.a

14 lines
337 B

CREATE TABLE sale(Mont INT, sales INT)
2 years ago
LOAD DATA INFILE "moving_avg.csv"
INTO TABLE sale
FIELDS TERMINATED BY ","
2 years ago
SELECT Mont,avgs(3,sales)
2 years ago
FROM sale
ASSUMING ASC Mont
2 years ago
INTO OUTFILE "moving_avg_output.csv"
FIELDS TERMINATED BY ";"
select Mont, mins(2,sales) from sale assuming desc Mont group by sales
2 years ago
into outfile "flatten.csv"