Reputation:
What is wrong with this code?
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;
Upvotes: 0
Views: 22
Reputation: 146239
group by
automatically produces one row per distinct permutation of the grouping columns. So your use of distinct
is redundant as well as syntactically invalid.
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;
Upvotes: 2