Question2Answer query failed:

SELECT u.userid, COUNT(a.postid) AS qs, SUM(q.selchildid=a.postid) AS selected
FROM qa_users u
LEFT JOIN qa_posts a ON u.userid=a.userid AND a.type="A"
LEFT JOIN qa_posts q ON a.parentid=q.postid AND q.type="Q"
WHERE u.handle='زهرا فرهانی'

Error 1140: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'javaby_q2a.u.userid'; this is incompatible with sql_mode=only_full_group_by