i have column and rows in my table as below
col1 col2 col3 col4
-----------------------
A 1 100 AA
B 2 200 BB
B 1 100 AA
A 2 200 BB
col2, col3 and col4 have duplicate rows, but not in col1. i want the final result is
col1 col2 col3 col4
-----------------------
A 1 100 AA
B 2 200 BB
i've tried this queries, but not Working
DELETE aliasName FROM
(
SELECT *, ROW_NUMBER() OVER (
PARTITION BY col1,col2,col3,col4 ORDER BY col1
) AS rowNumber FROM Table) aliasName
WHERE rowNumber > 1
if i remove the PARTITION BY col1, the result is
col1 col2 col3 col4
-----------------------
A 1 100 AA
A 2 200 BB
this my real table result is
JSP/14/06/2017/1810759183 SRK/14/06/2017/1265996087 JS_43345.43556 BB 20000 1
JSP/14/06/2017/800205939 SRK/14/06/2017/2089009939 JS_43345.43556 BB 20000 1