select `authors`.`name`, `books`.`title`
from `books`
left join `authors` ON `authors`.`id` = `books`.`author_id`
select `authors`.`name`, count(`books`.`id`) as cnt
from `books`, `authors`
group by `books`.`author_id`
having count(`books`.`id`) = 0
select `authors`.`name`, count(`books`.`id`) as cnt
from `books`, `authors`
group by `books`.`author_id`
having count(`books`.`id`) > 1