For #1, just create/append to your tables under d:/Q/tst/yyyy.mm.dd/db
.Q.fsn[{
t:.Q.en[`:d:/Q/tst/] update "Z"$((8#'moment),'"T",/:(-9#'moment)) from
flip`symbol`sys`typ`moment`id`action`price`volume`id_deal`price_deal`own`account!("SCC*JIFIJFXS";",")0:x;
{[t;d](`$":d:/Q/tst/",string[d],"/db/")upsert select from t where d=`date$moment;}[t;]each exec distinct `date$moment from t;
}][`:c:/Q/orderlog.txt;100000000]
or you could do
{(`$":d:/Q/tst/",string[`date$first x`moment],"/db/")set x;}each t group `date$t`moment;