SELECT a.author_num, a.author_last, COUNT(w.book_code)
FROM book.book b, book.author a, book.wrote w
WHERE (b.book_code=w.book_code and w.author_num=a.author_num)
ORDER BY a.author_last DESC;
我有 3 张桌子;书、作者和写作。我需要找出作者写了多少本书。我需要子查询吗?
SELECT a.author_num, a.author_last, COUNT(w.book_code)
FROM book.book b, book.author a, book.wrote w
WHERE (b.book_code=w.book_code and w.author_num=a.author_num)
ORDER BY a.author_last DESC;
我有 3 张桌子;书、作者和写作。我需要找出作者写了多少本书。我需要子查询吗?