You are on page 1of 6

Student Name: AHMAD SAMEER

Student ID: f2022408031

Instructions:

1-Viva will be taken after submission

Let's consider a database scenario for a bookstore with three tables: Books, Authors, and Genres. Each
table has its own set of columns:

1. Books table:

• BookID (Primary Key)

• Title

• PublicationYear

• Price

• StockQuantity

2. Authors table:

• AuthorID (Primary Key)

• AuthorName

3. Genres table:

• GenreID (Primary Key)

• GenreName
1-List all books in the database:

2-List all authors in the database:


3-List all genres in the database:

4-List all books by a specific author (e.g., Jane Doe):


5-List all books in a specific genre (e.g., Mystery):

6-Find the book with the highest price:


7-List all books published in a specific year (e.g., 2020):

8-Find the average price of all books:


9-List all books with prices above a certain threshold (e.g., $50):

10-Count the number of books in a specific genre (e.g., Science Fiction):

You might also like