Q&A for administrators, end users, developers and designers for Craft CMS
Select max(CommentCount), Id From Posts Group by Id