title: I want to create a one time reporting job that generate day wise orders placed and and revenue earned for last 5 days. please help me
body: <p>I want to create a one time reporting job that generate day wise orders placed and and revenue earned for last 5 days. please help me.</p>
  
  <p><strong>Query 1:</strong></p>
  
  <pre><code>SELECT order_date,
    COUNT(web_order_number) AS num_orders,
    SUM(order_total)        AS daily_total
  FROM purchase_orders_owner
  WHERE order_date&gt;=date_sub(CURRENT_DATE, INTERVAL 5 DAY)
  GROUP BY order_date;
  </code></pre>
  
  <p><strong>Query 2:</strong></p>
  
  <pre><code>SELECT order_date ,
    COUNT(web_order_number) AS num_orders ,
    SUM(order_total)        AS daily_total
  FROM purchase_orders_owner
  GROUP BY DATE(order_date)
  </code></pre>