如何用sql语句查询出传递的日期参数上一年的数据
什么数据库
starttime改成FORMAT(YEARDELTA(TODATE(starttime,"yyyyMMdd"),-1),"yyyyMMdd")
表示上一年,
end同理
~~~~