improved episode query to work for sql