const db = require('../src/db');

async function checkAlerts() {
    try {
        const result = await db.query("SELECT source, count(*) as count FROM alerts GROUP BY source");
        console.log('Alert Breakdown:', result.rows);
        process.exit(0);
    } catch (err) {
        console.error(err);
        process.exit(1);
    }
}

checkAlerts();
