//创建时间与记账时间差异超过15天
UPDATE zy6 SET remark = "chenxiehan" WHERE createtime -tradedate>15 and (sourcename="记一笔" or sourcename="移动");
//每户总条数占比
SELECT sid, count(sid),sum(iif(remark="chenxiehan",1,0)) FROM zy6 WHERE (sourcename="记一笔" or sourcename="移动") GROUP BY sid,remark;
//未及时录入,12号以后录入上个月账
SELECT sid, count(sid) FROM zy6 where createtime >#2023-07-12# and (sourcename="记一笔" or sourcename="移动") GROUP BY sid
//可能漏记户数
UPDATE zy6 SET remark = iif(code>300000 and code <400000,1,0);
SELECT sid, count(sid),sum(remark) FROM zy6 GROUP BY sid;
//非收入所得编入收入
SELECT * FROM zy6 WHERE (tradeitemname like "*调查*" or tradeitemname like "*红包*" or tradeitemname like "*记账*" or tradeitemname like "*打牌*" or tradeitemname like "*麻将*" or tradeitemname like "*记帐*" or tradeitemname like "*彩票*" or tradeitemname like "*压岁*") and code<250000;
//清空账页
DELETE * FROM zy6 WHERE 1=1;