Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support for window functions like RANK #188

Copy link
Copy link
@stevenwdv

Description

@stevenwdv
Issue body actions

The validator marks queries with an alias (with or without AS) after window functions like RANK, DENSE_RANK, ROW_NUMBER, CUME_DIST, etc. as incorrect:
SELECT RANK() OVER(ORDER BY NULL) rank

[
  {
    "message": "An alias was previously found. (near <code>rank</code>)",
    "fromLine": 0,
    "fromColumn": 34,
    "toLine": 0,
    "toColumn": 38,
    "severity": "error"
  },
  {
    "message": "Unexpected token. (near <code>rank</code>)",
    "fromLine": 0,
    "fromColumn": 34,
    "toLine": 0,
    "toColumn": 38,
    "severity": "error"
  }
]

Support for this type of functions is probably not present yet, but weirdly enough the validator doesn't complain for queries without alias.

PHPMyAdmin 4.7.9
MariaDB 10.3.1 (window functions are supported since 10.2.0)

Update: these will also be supported in MySQL 8.0

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.