SQLite Forum

meaning of "GROUP BY CONSTANT"
Login
GROUP BY 0.5 means to group all the candidate records into a group by the constant provided.  Since the expression is constant, all candidates are grouped into a single group.

This should be contrasted to the case where the expression is a "plain integer" where it represents the ordinal position of the projection expression by which to group.

Note that using any constant that is not an integer has the same effect (eg GROUP BY 'yeehaw').

The output is exactly what would be expected -- the input rows are grouped into a single group and one row of the group (chosen at random) is used to provide values for all bare columns in the projection.