.echo on
.headers on
.mode column
--.system ls -lha /dev/ttyU*
--select load_extension('libsqlitefunctions.so');

.open 'ramdisk/aiox.db'
PRAGMA main.quick_check; 

.databases
.tables
.show
--.schema
-- lists latest row of hr and ir tables
.mode line
select * from hr order by dt desc limit 1;
select * from hrv1 order by dt desc limit 1;

select * from ir order by dt desc limit 1;
select * from irv1 order by dt desc limit 1;

--select  dt, systemstatusid as ss, AC_InWatt as 'Import:', Ppv1 as 'Solar:', OP_Watt as 'Consumption Power:', Bat_Watt as 'Dis(Charge) +(-)',  'Solar', Epv1_today, Epv1_total, 'Discharged', Ebat_dischrToday as Today, Ebat_dischrTotal as Total, 'Charged', Epv1_today + Eac_chrToday, Epv1_total + Eac_chrTotal,'Load Consumption', Eop_dischrToday, Eop_dischrTotal   from ir order by dt desc limit 1;

select '<<<END>>>';

