private long getUsrCount(string hash, bool isOnly24h = false, long indexBefore24h = 0) { var findJo = new JObject { { "contractHash", hash } }; if (isOnly24h) { findJo.Add("blockIndex", new JObject { { "$gte", indexBefore24h } }); } var list = new List <string>(); list.Add(new JObject { { "$match", findJo } }.ToString()); list.Add(new JObject { { "$group", new JObject { { "_id", "$address" }, { "sum", new JObject { { "$sum", 1 } } } } } }.ToString()); list.Add(new JObject { { "$group", new JObject { { "_id", "$id" }, { "sum", new JObject { { "$sum", 1 } } } } } }.ToString()); return(mh.AggregateCount(remoteConn.connStr, remoteConn.connDB, "contract_call_info", list, false)); }