Login
Remember
Register
Ask a Question
In a database containing information about books and authors
0
votes
asked
Jan 23, 2024
in
Oracle
by
SakshiSharma
In a database containing information about books and authors, write an SQL query to identify the author with the most published books.
databaseinfog
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 23, 2024
by
SakshiSharma
SELECT author_id, author_name, COUNT(book_id) AS total_books
FROM Authors
JOIN Books ON Authors.author_id = Books.author_id
GROUP BY author_id, author_name
ORDER BY total_books DESC
FETCH FIRST 1 ROWS ONLY;
...