Please solve all the questions at one time because I only have 20 post per month
ID: 3583088 • Letter: P
Question
Please solve all the questions at one time because I only have 20 post per month and all by computer because handwriting sometimes hard to read Horizon Books: Horizon Books is a bookstore in downtown Jeddah. It carries an inventory of approrimately 50000 books. Customers come in and browse the shelves, select their books and take them to one of three cashiers positioned in different parts of the store. One of the cashiers is situated at an information desk where customers can discover whether a particular book is in stock.place orders for books not currently available in the bookstore, and collect and pay for books previously ordered The cashier at the information deskhas a book database that is consulted for every query. There are no credit saks 4 austomers pay for their purchases at the time of purchase. Following is the process model Inventory 1.1 customer (0,M Query Information (0,1) Sale Desk (1,1) 1.1) (0,M) Payment (0,M) CashExplanation / Answer
1.select customername from customers where customerage=20
2. select booksname from inventory i ,books stores b where b.books edition=3
3. select customername,paid from customers s, books store b where b.booksprice>500
4.select distinct customername from customers;
5.select customerid,customername,orderid from customers s,cashier c where c.orderedid=1 and c.orderedid=2
6. select orderid,customerid,orderdate from customers s ,where ordered=2
7.select * from inventory;
8.
select customerid,customername,orderid from customers customerdate<5 august 2015
9. show cashier id and receipt id for those books which price is more than 1000 and the book
category is "politics".
select cashier id ,receipt id from cashier s,inventory i ,customers s, books store b where b.booksprice>100 and b.books category=” quot”
10. print the total number of customers.
select count(customername) from customers
11
find the average price of books in the inventory database.
12. show the total cost of all the books present in the book store
select ‘total cost’ = sum(booksprice), bookid
from books store