diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs index 8dca441..cc6fece 100644 --- a/SolarPower/Repository/Implement/OverviewRepository.cs +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -734,7 +734,7 @@ namespace SolarPower.Repository.Implement sql = $@" select left(c.`TIMESTAMP`, 4) AS `TIMESTAMP`, sum(monthKWH) AS KWH, round(AVG(PR), 2) AS PR , round(AVG(PR), 2) AS avgPR , ifnull(avg( P.IrrDay), 0) irrDay, avg(P.Temperature) AS Temp FROM power_station_history_month C - LEFT JOIN sensor_history_month P ON DATE_FORMAT(P.TIMESTAMP, '%Y') = DATE_FORMAT(C.TIMESTAMP, '%Y') AND P.PowerStationId = C.PowerStationId + LEFT JOIN sensor_history_month P ON DATE_FORMAT(P.TIMESTAMP, '%Y-%M') = DATE_FORMAT(C.TIMESTAMP, '%Y-%M') AND P.PowerStationId = C.PowerStationId WHERE C.PowerStationId = {post.PowerstationId} group by left(c.`TIMESTAMP`, 4) "; break;