You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a chunk of a query that collects ordered items and groups them by item number and date.
SELECT DISTINCT
DATE(sales_flat_order_item.created_at) AS Date,
sales_flat_order_item.sku AS Item_Number,
sales_flat_order_item.name AS Item_Description
GROUP BY Date, Item_Number
ORDER BY Date DESC
When I filter this set of results on the date, it doesn't include records on the start date. For example, if the date filter is March 4 start and March 5 end, I only see records from March 5.
If I remove the DATE() function and just use the created_at value (which includes time of day, so I'm not able to group by that accurately) then results will match the start date.
The text was updated successfully, but these errors were encountered:
To Reproduce the query should be ... (added missing FROM)
SELECT DISTINCT
DATE(sales_flat_order_item.created_at) AS Date,
sales_flat_order_item.sku AS Item_Number,
sales_flat_order_item.name AS Item_Description
FROM sales_flat_order_item
GROUP BY Date, Item_Number
ORDER BY Date DESC
Here's a chunk of a query that collects ordered items and groups them by item number and date.
When I filter this set of results on the date, it doesn't include records on the start date. For example, if the date filter is March 4 start and March 5 end, I only see records from March 5.
If I remove the
DATE()
function and just use thecreated_at
value (which includes time of day, so I'm not able to group by that accurately) then results will match the start date.The text was updated successfully, but these errors were encountered: