Thank you. But the resulting table makes rows not for days but once a day for all entries in the database.
it is stored frequently in the database. okay
But when the time comes when the resulting table calculates the difference. For example, once a day or once a month, differences will appear for everyone in the database.
I'm trying to make the counter grow in the database. It's OK. for example, write a counter to the database every 10 minutes or once an hour. That's enough. I can do that.
But the task of the daily table is to take the last entry of a specific day and subtract from it the first entry of the day. And display the result as one single line. That's the daily consumption.
The second table exactly the same, just subtract the first entry in the month from the last entry in the month. That would be the monthly status.
One column would have the month number and the other the result.
In this state, I would have to have one database for days and another for months, and save the daily database once per day and the monthly database once per month. But that would have to be exactly given the time and day when it should be saved.
I will try to read the functions for text programming to see if there is a function for this purpose.
Is there a function that can read the first and last record in a given time period from the database?
I honestly did not expect that such a simple and basic function, which is used in any applications that work with counters of supplied energy, water, fuel ... anything, would be so complicated.
Thank you very much for trying to help me.