Recording Daily Totals

You only had one record in your log_counter table, so when the daily_counter query ran it didn’t find a second record to do the daily calculation.

Set your LogCounters transaction group to execute at 7:00. Set your LogDailyCounter transaction group to execute at 7:15.

Basically what you are doing is logging your counter values in the log_counter table once a day at the same time. The query for the LogDailyCounter transaction group will look at the log_counter table for all the records for today, then it will find the matching records from yesterday and insert the difference between the counter values in the daily_counter table.