--calc load
select date(dt) as day,  min(Eop_dischrTotal), max(Eop_dischrTotal), round((max(Eop_dischrTotal) - min(Eop_dischrTotal) ),1) as load  from ir  group by day;
select min(dt), max(dt),  min(Eop_dischrTotal), max(Eop_dischrTotal), (max(Eop_dischrTotal) - min(Eop_dischrTotal) ) as load   from ir ;
--calc solar
select date(dt) as day,  min(Epv1_total), max(Epv1_total), round((max(Epv1_total) - min(Epv1_total) ),1) as eod  from ir  group by day;
select min(dt), max(dt),  min(Epv1_total), max(Epv1_total), (max(Epv1_total) - min(Epv1_total) ) as eod   from ir ;
--OP_Watt
select median(OP_Watt) from ir;

