from_unixtime(b.addtime, “%H:%i:%s”) as 时间
%H:%i:%s 为24小时制
%h:%i:%s 为12小时制
select b.mch_id 专柜id,c.name 专柜名称,b.order_no 订单号,if(b.is_offline, "到店自提", "邮寄") as 配送方式,if(b.is_supplement, "是", "否") as 是否补录,a.transaction_goods_name 商品名称,e.name 一级分类,f.name 二级分类,a.num 购买数量,b.total_price 订单总价,b.pay_price 微信支付,b.store_card_pay_price 购物卡,b.mika_coupon_discount 优惠券,b.member_price_discount 会员折扣,# c.name 商品分类,from_unixtime(b.addtime) as 日期,from_unixtime(b.addtime, "%H:%i:%s") as 时间from hjmallind_order_detail as aleft join hjmallind_order as b on a.order_id = b.idleft join hjmallind_mch as con b.mch_id = c.idleft join hjmallind_goods as d on a.goods_id = d.idleft join hjmallind_true_goods_category as e on d.new_goods_cat_first = e.idleft join hjmallind_true_goods_category as f on d.new_goods_cat_second = f.idwhere b.is_pay = 1and from_unixtime(a.addtime, "%H:%i:%s") >= "00:00:00"and from_unixtime(a.addtime, "%H:%i:%s") <= "09:30:59"and b.addtime >= 1640966400and b.addtime <= 1654012799# order by a.id desc# select count(*) from hjmallind_order where addtime >= 1640966400 and is_pay = 1;# // 早上:00:00:00-09:30:59 晚上:22:00:00-23:59:59# 字段:# 商品门店、商品名称、商品分类、数量、金额(实付金额、券、365优惠金额) 邮寄/自提# show create table hjmallind_order
