SQL

SQL

Made by DeepSource

Column expression without alias detected SQL-L013

Anti-pattern
Major

It is recommended to use explicit AS clause for column expressions.

Bad practice

In this example, there is no alias for both sums.

SELECT
    sum(a),
    sum(b)
FROM foo

Recommended

Add aliases.

SELECT
    sum(a) AS a_sum,
    sum(b) AS b_sum
FROM foo