I must count the number of books an author has (the number of books is 18, and the authors are 25)
SELECT autor_id,titulo,COUNT(*) as cantidad_libros
FROM titulo_autor ta,titulos ti
WHERE ta.titulo_id = ti.titulo_id
GROUP BY ta.autor_id, titulo
I don't know what I'm doing wrong, since it only counts 1 for each title and even many values are repeated