We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bda8c86 + 74673c9 commit 0f81d14Copy full SHA for 0f81d14
docker/sample-postgres-library/init/1-library-schema-and-data.sql
@@ -88814,11 +88814,11 @@ CREATE OR REPLACE VIEW library.top_ten_borrowed_books AS
88814
books.pages,
88815
books.year,
88816
books.publisher,
88817
- sum(issue_details.id) AS issue_count
+ COUNT(issue_details.id) AS issue_count
88818
FROM (library.books
88819
JOIN library.issue_details ON (((books.id)::text = (issue_details.book_id)::text)))
88820
GROUP BY books.id
88821
- ORDER BY (sum(issue_details.id)) DESC
+ ORDER BY issue_count DESC
88822
LIMIT 10;
88823
88824
0 commit comments