此代码有什么问题?
Select Distinct(Output), Max(x.Senddate)
From Url_Response x
Where Upper(x.Output) Not Like '%SUCCESS%'
Group By Distinct(Output)
Order By 1 Desc;
答案 0 :(得分:2)
group by
会自动为每个不同的分组列排列生成一行。因此,distinct
的使用是多余的,语法无效。
Select x.Output, Max(x.Senddate)
From Url_Response x
Where Upper(x.Output) Not Like '%SUCCESS%'
Group By x.Output
Order By 1 Desc;