Inconsistent results on query

I’m doing a simple query for data from a Druid database, and the results I get differ from the ones present in the dataset, which are consistent with the ones I get with Pivot.

Spark SQL query on source data:
select Country,COUNT(*) AS count from AllUsers GROUP BY country ORDER by count DESC LIMIT 5;
Spain 974613
United Kingdom 663602
France 633858
Germany 401395
Netherlands 239266

Metabase visualization:

Is there something else going on here?

Thanks.

Pivot visualization:

More data. I managed to capture both metabase’s and pivot’s query/response data.

metabase query

{“intervals”:[“1900-01-01/2100-01-01”],
“granularity”:“all”,
“context”:{“timeout”:60000},
“queryType”:“timeseries”,
“dataSource”:“allusers”,
“aggregations”:[{“type”:“count”,“name”:“count”}]
}

metabase result

[{“timestamp”:“2000-01-01T00:00:00.000Z”,“result”:{“count”:1218955}}]

pivot query

{“queryType”:“timeseries”,
“dataSource”:“allusers”,
“intervals”:“1999-12-31T00:01Z/2000-01-01T00:01Z”,
“granularity”:“all”,
“context”:{“timeout”:40000},
“aggregations”:[{“name”:“count”,“type”:“doubleSum”,“fieldName”:“count”}]
}

pivot response

[{“timestamp”:“2000-01-01T00:00:00.000Z”,“result”:{“count”:4166544.0}}]

Nevermind, I was comparing the number of rows to the sum of the count.

1 Like

Glad it got squared away!