sqlite3 - column delta values -
i planning store query data in sqlite3 database.
i have these fields in sqlite3
unix_epoch, cumulative_query_rate 1452128581, 150 1452128582, 190 1452128583, 220 1452128584, 270
i want queries-per-second column below:
qps 0 40 30 50
how do in sqlite3.
you have subtract value of previous second:
select unix_epoch, (select t1.cumulative_query_rate - t2.cumulative_query_rate supersecrettablename t2 t1.unix_epoch - 1 = t2.unix_epoch ) qps supersecrettablename t1;
Comments
Post a Comment