First off, this is my first time posting on this forum. I've got a database with a long list of strings, what I'd like to do is find how many of these strings contain other strings in the same table, and if they are sorted in descending order, what's it's index within that sub table?
For instance, if I have the strings a, await, wait, waiting, walk then the index for wait should be 2 (or 1 if we start counting from 0).
I was able to count how many occurrences there were (in this case 3).
Each name in the table is unique.
The query only needs to be run once every few months and has a list of about 2000 string.