I'm trying to find a Query Language for our product team, so they can create "red-flags" based on complex queries of a collection. as they are not familiar with code, i've tried looking at JsonIQ solution but it seems it's un-maintained and couldn't find a simple solution to MongoDB.
So they a simple alternative? can mongo "stages" query accomplish something like the following example (if so, how?)
itemCount = number of total contributionItems
if itemCount>5
foreach item
if (number of items with the same party)/itemCount>0.8
save that party as party1
PH1=party1
for each contributionItem if (contributionItem.party != party1)
add item to array.
PH2=array[item.party]