Skip to content

"group by" is generated with an incorrect position #162

Description

@rorsarach

WP Version: 6.8.3
PG4WP Version: V3

Error:

ERROR:  syntax error at or near "GROUP"
LINE 2:                                 WHERE GROUP BY post_status

RAW SQL

SELECT post_status, COUNT( * ) AS num_posts FROM wp_posts WHERE post_type = 'page' GROUP BY post_status

Expected Rewritten SQL

SELECT post_status, COUNT(*) AS num_posts FROM wp_posts WHERE post_type = 'page' GROUP BY post_status

Actual Rewritten SQL

SELECT post_status, COUNT(*) AS num_posts FROM wp_posts WHERE GROUP BY post_status

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