insert into history (mdwkup,macdup,mdate,mdwkmd) SELECT
(select count(*) FROM fxj where mdwkup=1),
(select CURDATE()),
(select round(avg(mdwkmd),2) from fxj) where datetime('now',
'localtime')>15:00
The sql command could not run
___
sqlite-users
I hace many record of product database,and wanna count the moving average
value of sales_vol of last 3 days(id) of value, how to write sql command?
id Sales_vol mov_avg
1 1
2 2
3 3 =(1+2+3)/3
4 5 =(2+3+5)/3
5 4
How to run sql file in c++?
I have a sql file contain any sql cmd and I will run the sql cmd file in
c++,
And I know use .read in sqlite shell cmd,but how to run the cmd in c++?
___
sqlite-users mailing list
sqlite-users@sqlite.org
update dzhhq set mnote=
case when (select dzhhq.*,b.bs from dzhhq inner join (select bs,stkcode
from buysell) b on dzhhq.stkcode=b.stkcode) then 'sell'||mnote
else mnote
end
this command:
(select dzhhq.*,b.bs from dzhhq inner join (select bs,stkcode from buysell)
b on dzhhq.stkcode=b.stkcode);
4 matches
Mail list logo