Replies: 2 comments 1 reply
-
Hi @luifire , Aggregate functions are always applied to groups, if the query has a Seq does not have tables because it is a log not a relational database. To query the log you should select from It automatically includes the group labels, so your query should be:
The docs explain all of the different things you can do. |
Beta Was this translation helpful? Give feedback.
-
Thanks, my bad. This was not about |
Beta Was this translation helpful? Give feedback.
-
Hi people,
Generally, I want to have the aggregate function to aggregate within a group from group by, instead it "group by" does not seem to do anything, when I aggregate.
Example:
Now
SELECT Country, COUNT(*) FROM table GROUP BY Country
should yieldInstead it yields "The expression
Country
is not an aggregate operation. Only aggregates (min
,max
...) can be selected from queries with groupings."If I do
SELECT COUNT(*) FROM table GROUP BY Country
, the GROUP BY part does not do anything, i.e. this query:SELECT COUNT(*) FROM table
yields the same, i.e.Am I doing something wrong? Is there a better way to do that? I want to have this as histogram in my dashboard.
Practical applications: seeing how often particular devices have connected.
Similar discussions:
#1501
Beta Was this translation helpful? Give feedback.
All reactions