Q&A about the site for administrators, end users, developers and designers for Craft CMS
select u.id, count(distinct(p.id)) as postcount, u.creationdate, p.acceptedanswerid from users u inner join posts p on u.id = p.owneruserid ---where datediff(month, current_timestamp, u.creationdate) >= 6 where p.acceptedanswerid != '' group by u.id, u.creationdate, p.acceptedanswerid having count(distinct(p.id)) >= 10