Added SQL optimized for projects and trackers filters in Closed Metrics.