Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
WITH AggregatedTags AS ( SELECT pt.postid , STRING_AGG(t.tagname, ',') WITHIN GROUP (ORDER BY t.id asc) AS tag_combination FROM posttags pt join tags t on t.id = pt.tagid WHERE 1=1 and pt.postid=4973 GROUP BY pt.postid ) SELECT * FROM AggregatedTags where tag_combination like '%html%' --select * from tags where tagname='python' --select * from tags where tagname like '%html%'