So your issue is really not grafana but sqlite query language. You would get more traction if you posted on a sqllite forum. But that said what you have is not being grouped by anything neither by Zeit nor by date
All you are doing is taking the max and min and getting the difference.
The target should be, that the query take the min and max value (of each day) and calculate the consumption for each day. But im not able to Group the values day by day and im not sure, what is the problem. Is the problem the format of the time, is there a problem with the query, or is there a other problem.