Skip to content
Advertisement

How do I remove duplicate data in SQL?

I need to display lines that are not repeated, but only with their neighbors, they should remain in the entire database (also in a single copy) in sqlite. Here’s what I’m missing: Initial database:

What should be output:

Thanks 🙂

Advertisement

Answer

Using Lag and Case:

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