trying some funky shit

This commit is contained in:
Christopher Cookman 2023-10-02 17:49:42 -06:00
parent f0e0254a41
commit 4f918f5a91
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -171,10 +171,11 @@ const generateExtensionListEmbed = async () => {
// Construct SQL query to check all unique extensions at the same time
console.log("2 debug start SQL query")
const rows = await conn.query(`
SELECT cid_num
SELECT cid_num, MAX(eventtime)
FROM cel
WHERE cid_num IN (${uniqueExtensions.join(",")})
AND eventtime >= DATE_SUB(CURDATE(), INTERVAL 30 DAY)
GROUP BY cid_num
`);
console.log(`2.1 query end ${rows.length}`)