Question: I would like to know the SQL queries to using ORACLE: 1. Total up the number of checkouts made on each month of the year.

 I would like to know the SQL queries to using ORACLE:

I would like to know the SQL queries to using ORACLE:

1. Total up the number of checkouts made on each month of the year. Then print the month (spelled out completely) and the total number of corresponding checkouts next to it. That is, print "January" and total number of checkouts made in January, and so on. 2. Show the furniture styles that are checked-out on Sundays only. That is, none of the furniture in that style must have been checked out on any other days. 3. Find names of people who have checked out any piece of furniture within the last 15 days (not counting the day the query is being run) but have not returned that yet. Print their names and the string "* To be contacted" next to each name. 4. For all the furniture that were checked out in October 2018 and returned in November 2018, print their F_ID, category and style. However, while printing style, print 'M' for 'modern', 'R' for 'rustic', and 'T' for 'traditional'. 5. Assume that the price attribute of Furniture table indicates weekly (7 days) rental cost. Write a view to calculate the total money earned from all "rustic" style furniture, which has been rented and returned (i.e., do not take into consideration the ones that are yet to be returned). Print the amount.

Furniture f id category style price int char(20) char(15) dec(5,2) primary key not null values restricted to ['modern', 'rustic', 'traditional' not null [Example: sofa, bed,. Per week rental cost] Customers int char(10) char(13) char(15) primary key not null name phone email Check out int f id ck out date date ret date foreign key, references c id of customers foreign key, references f id of furniture not null int date [c id and f id together form the primary key]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!