I got this query, where i need to see how many matches there is, in that way I can see how many notifications is NOT seen. But - Let's say i where to count 1000 rows, is this a bad query?
$notifications = Self::query()
->columns(array('COUNT(Models\UsersNotifications.id) AS count', 'COUNT(seen.id) AS cnt'))
->leftJoin('Models\UsersNotificationsSeen', 'Models\UsersNotifications.id = seen.notificationid', 'seen')
->where('Models\UsersNotifications.userid = :userid:', array('userid' => $userid))
->limit(1)
->execute();