So the idea is simple but i have no idea how to do it and i have not found any useful information online.
I have a system setup to track internet data usage using MariaDB. I have a data cap that resets on the 13th of each month. And i would like to be able to display all data usage for the current cycle.
Is this possible with MySQL? (I will be using grafana to display the data)
Edit: Sorry i did not think to include the table schema
create table network.data_usage
(
time timestamp default current_timestamp() not null on update current_timestamp(),
mac varchar(32) not null,
download bigint default 0 not null,
upload bigint default 0 not null
);
obviously the time field is the most relevant to this question. the upload and download fields store the total bytes in/out for a specific mac address since the previous entry.