Good afternoon Personal, I have these two tables that relate to know how many times a user has accessed the system:
And I have this query:
select nome_usuario, count(id_log) as qtde from logs as l left join usuario as u on l.usuario_log = u.id_usuario group by usuario_log order by qtde desc
Today it brings me the result of how many times the user has accessed. And I would like if I can not find records from the log
table, assign zero '0' how do I do this?