Skip to content

When count(column) is used on selection group and having conditions are ignored #283

Description

@MartinMystikJonas

Version: all

Bug Description

When count(column) is used on selection group and having conditions are ignored

Steps To Reproduce

$selection->group('column1')->having('SUM(column2) > 0')->count('column1')

Expected Behavior

Return only rows where having conditions is met instead or all rows.

Possible Solution

Also copy group and having parameters in importConditions of SqlBuilder

public function importConditions(self $builder): void

Or is there reason why it is not copied?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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