feat(statistics): implement top alert stocks, top last sales, top supplier debts, and top selling products endpoints with SQL queries
This commit is contained in:
@@ -33,7 +33,7 @@ async function main() {
|
||||
let sqlOutput = '-- AUTO-GENERATED MYSQL TRIGGER DUMP\n'
|
||||
sqlOutput += '-- Generated at: ' + new Date().toISOString() + '\n\n'
|
||||
|
||||
for (const trg of triggers) {
|
||||
for (const [index, trg] of triggers.entries()) {
|
||||
const name = trg.Trigger
|
||||
console.log(`📥 Extracting trigger: ${name}`)
|
||||
|
||||
@@ -42,6 +42,7 @@ async function main() {
|
||||
const createStatement = rows[0]['SQL Original Statement']
|
||||
|
||||
sqlOutput += `-- ------------------------------------------\n`
|
||||
sqlOutput += `-- index: ${index + 1}\n`
|
||||
sqlOutput += `-- Trigger: ${name}\n`
|
||||
sqlOutput += `-- Event: ${trg.Event}\n`
|
||||
sqlOutput += `-- Table: ${trg.Table}\n`
|
||||
|
||||
Reference in New Issue
Block a user