Different values ββof timestamps in the table will have different values ββof hour, minute, second. SQL GROUP BY is used to collect multiple rows with the same value, so the syntax will not work here. If you only need one day to evaluate the data, you can do something like this if you have a food_info table with food_id and calorie_count columns:
SELECT SUM(calorie_count) FROM food_logs fl INNER JOIN food_info fi ON fi.food_id = fl.food_id WHERE log_date >= '2012-21-05' AND log_date < '2012-21-06'
You may need to adjust it a bit to match SQLLite's specific semantics.
source share