0
I have this query in order to list users with more comments, however, it cannot display users with the banned column=true.
SELECT * FROM usuarios a
INNER JOIN topicos_comentarios b ON a.usuario = b.autor
WHERE a.banido <> true
GROUP BY a.usuario
ORDER BY count(a.usuario) DESC LIMIT 3
This select was made by a friend here, but it’s not working. Lists users usually including banned.
The structure of my users table:
@Paulo Sérgio Filho, post the contents of his table
usuarios
, please– Roberto de Campos
Users table structure: https://prnt.sc/fs0vor
– Paulo Sérgio Filho
Structure of the topical table_comments: https://prnt.sc/fs1l1r
– Paulo Sérgio Filho