I use a cron job to run the auto-archiving process for Matomo. It works great. I am analyzing some of the data and I noticed that when I filter the data in a numeric archive table for period 3 (which is the total number of visits for a given month), I get three records back for each site. However, I only expected to see one for each site e.g. the total number of visits to a site for a single month. Of those three records coming back for a single site, it appears that the oldest record in the query is the summation of the later two records and also the oldest record is the total visits to the site for a given month.
Here's an example of the query:
select * from piwik.piwik_archive_numeric_2019_10 as q
where q.name = 'nb_visits' and q.idsite = 1 and q.period = 3;
Does anyone know why there are three records being returned from a piwik_archive_numeric_<date>
table for the month period (e.g. period 3).