a guest Sep 22nd, 2018 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Select o, count(opt.id) from Offer o inner join o.options opt inner join o.teritories t inner join o.comments c where t.id = :teritoryId and opt.id in :featuresIds group by o having avg(c.rate) between :rateMin and :rateMax and count(opt.id) = :featuresLength
RAW Paste Data