I need sql query that from data:
1.2.4.1.1
1.2.4.1.2
1.2.4.4
1.2.4.4.1
...
Takes all data except1.2.4.4.1 because he is part of1.2.4.4,
So I need the highest level of every row that has 1.2.4 in root.
I tried something with "not exists" an I got data that have all correct rows and 1.2.4.4.1 , but I want to skip 1.2.4.4.1 and get only :
1.2.4.1.1
1.2.4.1.2
1.2.4.4