MYSQL version 5.7.31
This one works almost as intended. Only problem is that I want to get only the first unique matching row to the where clause below but it shows d