Remove uneeded joins when selecting applications