Create Table DBONE AS (
Select distinct count(X) as Count, Y, Z
FROM Schema.Table
Where (Schema.Table.X like '%Retire%' or Schema.Table.X like '%Obsolete%')
Group by (X, Y, Z)
)
ORDER BY X, Y, Z asc;
如何将总和添加到 count(X) 语句的末尾作为计算计数总和的另一列,或者在行的底部?
我试过了
Union All
Select 'SUM' X (table)
From Table
但这是不正确的