load "test" as buf define size := 1200; select sum(i*p[i]) as Lw from buf for i := 0 to size-1 group 1;