S
S
strelkovandreyv2020-01-13 20:46:57
SQL
strelkovandreyv, 2020-01-13 20:46:57

How to filter duplicate value in two table row fields?

Good afternoon, tell me please - how can I select the table below on the left with a request to get a table like on the right
. you need to remove the duplicate, while considering the duplicate as the one whose TITLE and HASH values ​​are equal (i.e. how to consider them together as unique), i.e. if such occur, then only leave one option (in this example, the value of which ID is the largest)
5e1cacb104161614069934.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman, 2020-01-13
@strelkovandreyv

SELECT MAX(ID), TITLE, HASH
FROM <tablename>
GROUP BY TITLE, HASH

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question