Q&A for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
SELECT p.Id AS PostId, p.Title, STRING_AGG(t.TagName, ', ') AS Tags FROM Posts p JOIN PostTags pt ON p.Id = pt.PostId JOIN Tags t ON pt.TagId = t.Id WHERE p.PostTypeId IN (1, 2) GROUP BY p.Id, p.Title HAVING COUNT(pt.TagId) >= 5 ORDER BY p.Id