我想更改查询,以便指标/标签不同。因此,图表不会显示“sum_sum_girls”,而是会显示“Total Girls”之类的内容。
当前查询如下:
SELECT state AS state,
SUM(sum_girls) AS sum__sum_girls
FROM birth_names
WHERE ds >= '1918-05-11 00:00:00.000000'
AND ds <= '2018-05-11 18:03:20.000000'
AND state NOT IN ('other')
GROUP BY state
ORDER BY sum__sum_girls DESC
LIMIT 50000
OFFSET 0;`enter code here`
我想改变它,所以它说
SELECT state AS state,
SUM(sum_girls) AS Total_Girls
FROM birth_names
WHERE ds >= '1918-05-11 00:00:00.000000'
AND ds <= '2018-05-11 18:03:20.000000'
AND state NOT IN ('other')
GROUP BY state
ORDER BY sum__sum_girls DESC
LIMIT 50000
OFFSET 0;
有什么建议吗?尝试谷歌搜索无济于事。我习惯于在 Tableau 中创建简单的自定义 SQL 查询。

