Error in my query ifnull. because? [closed]

-1

Query is not red and blue works!

SELECT * FROM posts LEFT JOIN (SELECT COUNT(id_rela_post), ifnull(qt_vezes, 0), para FROM rela_post GROUP BY para) post_detalhe on posts.id_post = post_detalhe.para

    
asked by anonymous 26.02.2018 / 20:06

1 answer

2

The correct thing would be to put IFNULL(COUNT(id_rela_post), 0) , instead of putting it in the search alias.

    
26.02.2018 / 20:42