Comment 5 for bug 615237

Revision history for this message
Robert Collins (lifeless) wrote :

SELECT COUNT(*) FROM Person JOIN TeamParticipation ON TeamParticipation.person = Person.id LEFT JOIN KarmaTotalCache ON KarmaTotalCache.person = Person.id LEFT JOIN PersonLocation ON PersonLocation.person = Person.id LEFT JOIN Archive ON Archive.owner = Person.id LEFT JOIN EmailAddress ON EmailAddress.person = Person.id LEFT JOIN account on person.account=account.id WHERE TeamParticipation.team = 238131 AND NOT (TeamParticipation.person = 238131) AND (Archive.id IS NULL OR Archive.id = (SELECT MIN(Archive.id) FROM Archive WHERE Archive.owner = Person.id) AND Archive.purpose = 2) AND (EmailAddress.status IS NULL OR (EmailAddress.status = 4 AND (account.status is NULL or account.status=20)));