0

So, I have a single column that would have different string values, is it possible to sort it based on similarities in the string?

e.g. table.name would be '3d audio' , but then we would have table.name to be '3d audio and entertainment' and other possible scenarios, however '3d audio is just example' - any string is possible, so I cant filter by certain strings.

I know I've asked this, however I asked it as a secondary question to another one and it felt like it was overlooked

select pt.id, pt.name ,pt2.name from product_taxonomy pt
left join product_taxonomy pt2 on pt2.name = pt.name
where pt.name like pt2.name

This does not seem to be working at all, as I want to compare pt.name with the next instance of pt2.name, so lets say I have id = 1, 2, 3, 4 ,5 so I want to compare pt.name with id=1 to pt.name with id=2 and so on

New contributor
Ruthock is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Ruthock is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.