SQL

SQL

Made by DeepSource

Ambiguous ordering directions for columns in ORDER BY clause SQL-L037

Style
Minor

If any columns in the ORDER BY clause specifies ASC or DESC, then all columns with ORDER BY present in the query should do the same. For it helps improve legibility and consistency.

Bad practice

SELECT
    a, b
FROM foo
ORDER BY a, b DESC

Recommended

SELECT
    a, b
FROM foo
ORDER BY a ASC, b DESC