@typus/typus-sdk 1.2.35 → 1.2.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -281,8 +281,8 @@ function getExpLeaderBoard(startTimestamp, endTimestamp) {
|
|
|
281
281
|
_endTimestamp = endTimestamp ? endTimestamp : "99999999999";
|
|
282
282
|
requestData = {
|
|
283
283
|
sqlQuery: {
|
|
284
|
-
sql: "SELECT S.distinct_id
|
|
285
|
-
size:
|
|
284
|
+
sql: "SELECT S.distinct_id AS address, SUM(E.exp_earn) AS total_exp_earn\n FROM ExpUp E\n JOIN (\n SELECT number, distinct_id\n FROM StakeNft\n WHERE (number, timestamp) IN (\n SELECT number, MAX(timestamp) AS max_timestamp\n FROM StakeNft\n GROUP BY number\n )\n ) S ON E.number = S.number\n WHERE E.timestamp >= ".concat(startTimestamp, " && E.timestamp < ").concat(endTimestamp, "\n GROUP BY address\n ORDER BY total_exp_earn DESC;"),
|
|
285
|
+
size: 100,
|
|
286
286
|
},
|
|
287
287
|
};
|
|
288
288
|
jsonData = JSON.stringify(requestData);
|
|
@@ -302,3 +302,7 @@ function getExpLeaderBoard(startTimestamp, endTimestamp) {
|
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
304
|
exports.getExpLeaderBoard = getExpLeaderBoard;
|
|
305
|
+
// (async () => {
|
|
306
|
+
// let res = await getExpLeaderBoard("1709539200", "1709625600");
|
|
307
|
+
// console.log(res);
|
|
308
|
+
// })();
|