Postgresql Nested Loop Semi Join