Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
select u.Id, 'with_post' as "group" from Users u full outer join Posts p on (p.OwnerUserID = u.Id) where p.Id is null union select u.Id, 'all' as "group" from Users u;