const fs = require('fs');
const data = JSON.parse(fs.readFileSync('dist/data/admin@mikrobil.com.json', 'utf8'));

if (data.vouchers) {
  const usedVouchers = data.vouchers.filter(v => v.status === 'used');
  console.log('Total used vouchers:', usedVouchers.length);

  // Let's count comments
  const comments = {};
  usedVouchers.forEach(v => {
    comments[v.comment] = (comments[v.comment] || 0) + 1;
  });
  console.log('Unique comments and counts (top 50):');
  console.log(Object.entries(comments).sort((a, b) => b[1] - a[1]).slice(0, 50));
}
