I tried using query.distinct() as per documentation. But I get a warning that I should add the leading $ sign to it. Which breaks the query. What is the new proper way of getting distinct values without aggregation pipeline?
const sQuery = new Parse.Query("Deliveries");
sQuery.equalTo("user", req.user);
sQuery.greaterThan("createdAt", new Date(timeframe));
sQuery.equalTo("status", "accepted");
sQuery.distinct("donator");
const totalDonatorsHelped = await sQuery.count({ useMasterKey: true });