我有以下查询:
SELECT
SUM(queries),
unique_identifier
FROM table_name GROUP BY unique_identifier
有没有办法按值将当前组作为SUM()的别名
示例:
SELECT
SUM(queries) AS unique_identifier
FROM table_name GROUP BY unique_identifier
或
SELECT
SUM(queries) AS unique_alias
FROM table_name GROUP BY unique_identifier AS unique_alias
预期结果应为:
SUM(), unique_alias_1
SUM(), unique_alias_2
SUM(), unique_alias_3