HI I want to group my results by a field that has had characters replaced but also keep the original value.
This is what I have but I need to return the original URL value without changing the results.
select Count(ID) as TotalClicks, Replace(URL, '/', '') as DistinctURL
from email_click_throughs
where emailid = @ID
group by Replace(URL, '/', '')
order by TotalClicks desc