const { PrismaClient } = require('@prisma/client'); const prisma = new PrismaClient(); async function main() { const total = await prisma.guest.count(); const confirmed = await prisma.guest.count({ where: { OR: [ { rsvpStatus: 'ACCEPTED' }, { AND: [{ rsvpStatus: null }, { isAttending: true }] } ] } }); console.log(`Total Guests: ${total}`); console.log(`Confirmed Guests: ${confirmed}`); } main() .catch(e => console.error(e)) .finally(async () => await prisma.$disconnect());