Exclude contacts from report based on membership they have
One solution could be to make a Smart Group (A) of those with Membership X or Y or Z, then have another Smart Group with the larger target group eg All Individuals (B), then use the Custom 'Include / Exclude' Search to do B not A.

This may not help you if your need an sql query but could be useful to others (if it works as I expect it would)