JOIN WITH SOME TROUBLE

@gcas with a lot of databases you can use Window functions like RANK to have more control over which record gets selected at the end. You might have to have a criterion to determine which row would get choosen. I have discussed options here

An example whith H2 database is here

3 Likes