Skip to content

n_distinct with group_by produces incorrect SQL for MSSQL #1366

@carlganz

Description

@carlganz
library(dbplyr)

con_test <- simulate_mssql()

translate_sql(n_distinct(y), con = con_test, vars_group = "x")

Use of DISTINCT is not allowed with the OVER clause in MSSQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend 🕺bugan unexpected problem or unintended behaviorfunc trans 🌍Translation of individual functions to SQL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions