In postgres I am fairly sure you can do something like this
SELECT
authors.stage_name,
count(select id from books where books.author_id = authors.id)
FROM
authors,
books;
Essentially, in this example I would like to return a list of authors and how many books each has written.... in the same query.
Is this possible? I suspect this approach is rather naive..
Thanks :)