[Solved] GROUP BY problem with varchar


The endings are different

7​i18704

5​i18704

4​i18704

Following your comment I have updated and they GROUP as expected. What do you get when you try this?

CREATE TABLE #Advertisements
(
ID INT IDENTITY(1,1),
Url VARCHAR(200)
)

INSERT INTO #Advertisements VALUES
('http://example.com')

INSERT INTO #Advertisements VALUES
('http://example.com')

INSERT INTO #Advertisements VALUES
('http://example.com')



SELECT COUNT(*) c, Url
    FROM #Advertisements
    GROUP BY Url

0

solved GROUP BY problem with varchar