Helper to create NOT EXISTS condition for anti-joins Returns records where the subquery returns no rows
// Find users with no ordersUser.findAll({ where: notExists('SELECT 1 FROM orders WHERE orders.user_id = users.id')}) Copy
// Find users with no ordersUser.findAll({ where: notExists('SELECT 1 FROM orders WHERE orders.user_id = users.id')})
Helper to create NOT EXISTS condition for anti-joins Returns records where the subquery returns no rows