Issue with stack dashboard

Hi guys,
At the company I work, we are implementing Grafana to show several reports based on our user’s activity. We designed a stack dashboard where it shows the customer behaviour per day, these behaviours are: “I want my portal”, “Invited”, “Activated”. The query thta we are using is this:

SELECT
  UNIX_TIMESTAMP(date_format(created_at, '%Y-%m-%d')) as time_sec,
  count(1) as value,
  activations.name as metric
FROM users, activations
WHERE
$__timeFilter(created_at)
AND activations_origins_id IS NOT NULL
AND activations_origins.id = users.activations_id
GROUP BY date_format(created_at, '%Y-%m-%d'), activations.name

This is the query result:
sql

The problem is that some stacks are showing wrong data, for example, for July 8th there is only one behaviour, which is 1 “activated” but the stack is showing the 1 “activated” and 2 “invited”. We already checked if was a timezone problem but it isn’t. The curious thing is that the total count of behaviours is ok but in the dashboard is wrong. I have to say we are usign the same query both for our Database and Grafana to compare the results.

This is our display configuration in case of any help for you:

Do you know what is happening?

Thanks in advance.

Please use the query inspector to verify that the time epoch values returned in response correspond to your dates above