sql查询今日,昨日

-- 当天
-- select count(id)from sgdj_order where is_outorder = '01' and date(last_update_date) = curdate()
-- select count(id)from sgdj_order where is_outorder = '01' and date(last_update_date) = curdate()
-- 前一天
select count(id)from sgdj_order where is_outorder = '00' and date(last_update_date) = SUBDATE(CURDATE(), 1)

    原文作者:Symbian米汤
    原文地址: https://www.jianshu.com/p/be55ab8546a1
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞