is there another way for getting the json doc associated with a MAX value? This works because I limit it to 1
myBucket AS buck
LET maxClic = (SELECT RAW MAX(clicks) from
WHERE buck.clicks <= maxClic
ORDER BY buck.clicks desc
But when I say buck.clicks = maxClic, nothing is returned.