antoniop
committed
on 13 Mar 19
Rewrite the query to leverage transparent variable quoting, replace count with quicker existance check, bring sql inline