BAP-156: Refactor queries
BAP-156: Refactor queries

mszajner/platform,hugeval/platform,2ndkauboy/platform,umpirsky/platform,geoffroycochard/platform,2ndkauboy/platform,orocrm/platform,northdakota/platform,trustify/oroplatform,geoffroycochard/platform,trustify/oroplatform,trustify/oroplatform,morontt/platform,morontt/platform,akeneo/platform,ramunasd/platform,akeneo/platform,Djamy/platform,2ndkauboy/platform,northdakota/platform,umpirsky/platform,mszajner/platform,mszajner/platform,Djamy/platform,morontt/platform,geoffroycochard/platform,orocrm/platform,akeneo/platform,Djamy/platform,ramunasd/platform,northdakota/platform,hugeval/platform,orocrm/platform,hugeval/platform,ramunasd/platform