Can anyone post a SQL query for Calculating the Total Number of Orders that was submitted per Day for the last 7 days?
ORDER_DETAIL_ID - DESCRIPTION: A unique identifier for an Order Detail. It is populated from an Oracle sequence.
CREATE_TS - DESCRIPTION: Contains the date and time the row was created.
I was trying to use this one but not really sure if that would be correct
SELECT date(CREATE_TS)
, COUNT(ORDER_DETAIL_ID) AS num_orders
, SUM(order_total) AS daily_total
FROM vestaadm.order_detail
GROUP BY date(CREATE_TS)
any sugestions woulf be graetly appreciated.