This repository contains SQL queries to create views for analyzing various aspects of a library database. Each view provides specific insights into the library's data, such as the number of books lent, overdue books, genres, publishers, and authors.
Before running the queries, ensure your database contains the following tables:
-
usersuser_idfnamelname
-
lendinguser_iddays_overdue
-
booksbook_idgenre_idpublisher_idauthor_id
-
genregenre_idgenre_name
-
publisherspublisher_idpublisher_name
-
authorsauthor_idfnamelname
-
Switch to the
librarydatabase:USE library;