I only have SQLite on hand, and I want to calculate the count of order per hour per day with table with below columns: orderID, order_datetime(yyyy-mm-dd hh:mm:ss), location
SELECT
DATEPART('%H', order_datetime) as 'HOUR',
COUNT(*) as 'ORDERPERHOUR'
FROM vanorder
GROUP BY DATEPART('%H', order_datetime);
I received error 'no such function: DATEPART', how can I achieve this in the world of sqlite? thanks.