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