Fixed DB error when looking up YouTube sync accounts

Before the filter was doing a LEFT JOIN, which would sometimes result
in duplicate rows if there were enough sync teams.

Updated the test to detect this and switched to using raw sql to do
the query.