joinVatsOnProducts(); $qb->andWhere("{$priceField} > 0"); return sprintf( 'min(%s) %s, max(%s) %s', $select, $minAlias, $select, $maxAlias ); }; } }