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.
14 lines
341 B
14 lines
341 B
CREATE TABLE sale(Mont INT, sales INT)
|
|
|
|
LOAD DATA INFILE "data/moving_avg.csv"
|
|
INTO TABLE sale
|
|
FIELDS TERMINATED BY ","
|
|
|
|
SELECT Mont,avgs(3,sales)
|
|
FROM sale
|
|
ASSUMING ASC Mont
|
|
INTO OUTFILE "moving_avg_output.csv"
|
|
FIELDS TERMINATED BY ";"
|
|
|
|
select Mont, mins(2,sales) from sale assuming desc Mont group by Mont
|
|
into outfile "flatten.csv" |