select hour(etim),totalpower from table group by hour(etime) having totalpower=max(totalpower)大概这样应该可以
这样就行
SELECT MAX(totalpower),HOUR(Etime) FROM xx_table GROUP BY HOUR(Etime)