Skip to content

sql count(*) returns no results instead of 0 when no rows meet filter #11145

@benkrug

Description

@benkrug

A select count(*) will return nothing rather than 0, if no rows pass the WHERE conditions.

Eg, load wikipedia.

select count(*) from wikipedia - returns 24433 (for me, in my load)

select count(*) from wikipedia where channel = 'abc' - returns nothing, not 0.

This is true running in the console, or using the API. There I get [{"EXPR$0":24433}] for the first query, and [] for the second.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions