Skip to content
Advertisement

Convert Postgre query to Hive/ Mysql

I have this table:

I want to a situation where each footballer appears only once in a new table. For instance, Messi appears twice, but I want to take any occurrence of Messi in the new table. I am not sure how to convert it to either Hive or mysql. This is what I want the desired results to look like:

Advertisement

Answer

One option could be using row_number()

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement