摘要:
select sum(c) into cc from ( (select 1 as c from qhdata_warehouse_north_stat.dw_ytb_org_base where occur_period = max_period limit 1 ) union all (sele 阅读全文
摘要:
取上个数据期,并将数值插入到变量中 /* 上个季度的数据期 */ DECLARE max_period int4; select DATE_FORMAT(date_sub(concat(year(now()),'-',lpad((quarter(now())-1)*3+1,2,'0'),'-01') 阅读全文