I am very poor at SQL queries, but I am learning, so please forgive this question.
Here is my current request:
SELECT TIMESTAMP, SUM( electricity ) AS electricity, `siteID` FROM table WHERE ( MONTH( `TimeStamp` ) =10) GROUP BY siteID
My table looks like this:
What I'm trying to do is summarize all the days of each month of each site so that I have one answer to the site and a month. Thus, in this example, the query should return the sum of the electricity values ββfor siteID 100, because they are all in month 10, the same for siteID 98 and 94.
thanks
source share