Skip to content

FILTER clause in SELECT clause #507

Closed
@yankyhgoflow

Description

@yankyhgoflow

In SQL we can add a FILTER clause to an aggregate SELECT clause, i.e.

SELECT [item], SUM([price]) AS [total], SUM([price]) FILTER ( WHERE [date] >= '2021-01-01' ) AS [sales2020]
FROM [orders]
GROUP BY [item]

It would be a huge help if SqlKata can support passing WHERE clauses with their bindings to a SELECT clause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions