From surenkid, 2 Months ago, written in MySQL.
This paste is a reply to vini查询订单详细信息 from surenkid - view diff
Embed
  1. SELECT o.wechatorderid, o.`name` product, o.num, o.total/100 total,  o.transaction_id, o.pay_time, m.`name` member, m.nickname, o.mobile, s.storename, s.esid
  2. FROM smwx_order o
  3. LEFT JOIN smwx_member m ON o.memberid = m.id
  4. LEFT JOIN smwx_store s ON o.storeid = s.id
  5. WHERE o.order_type = 'MASK_DAY' AND o.pay_time IS NOT NULL
  6. ORDER BY o.storeid,o.id DESC;