From surenkid, 6 Months ago, written in MySQL.
Embed
  1. SELECT FROM_UNIXTIME(paytime,'%Y-%m-%d') `order_date`, count(FROM_UNIXTIME(paytime,'%Y-%m-%d')) order_num
  2. FROM wfx_shop_order
  3. WHERE ispay = 1 AND format(totalprice,2) = 29.9 AND FROM_UNIXTIME(paytime,'%Y-%m-%d') IS NOT NULL
  4. GROUP BY FROM_UNIXTIME(paytime,'%Y-%m-%d')