_a collection of individual query scripts to execute as a minimum the following
ID: 3846963 • Letter: #
Question
_a collection of individual query scripts to execute as a minimum the following queries: (I need sql plus oracle codes for each question alone)
1- Develop an SQL query to show all the details of paintings such as painting's name, theme, owner's name, owner phone number which are availble for hire sort by the owner's name.?
2- Develop a query to display all the artist's details with their paintings, sort by the artist's name, then by the painting's name.?
3- Develop a query to show all the painting's which are hired for a partiod. The details such as the painting's names, owner's names and customer' names need to be displayed.?
4- Develop a query to list the customers in the platinum and gold category, who rented the paintings.?
5- develop a query to list the painting's name, the owner's name, and the monthly rental rates of all the paintings, sorted by the monthly rental rate.??
Explanation / Answer
Note: Without knowing the table names and table Columns it is difficult to write queries but based on your question and assuming the column names, tables and I wrote these queries. definetly these are going to help you. If you have any queries please leave comments.
And considering the table name as Paintings:
1)Select painting'sname, theme, owner'sname, ownerphonenumber from Paintings ORDER BY owner'sname ASC;
2)
I didnt understand whether you have artist table or have artist column in paintings. So here am assuming artists is separate table.
Select * from artist ORDER BY artist's_name, painting's_name;
3)
For this query considered a column partiod which is true, if it is hired
Select painting'snames, owner'snames and customer'names from Paintings where partiod='true';
4)
Tablename: Customercatagory
Select CustomerID,Customername from Customercatagory WHERE category='platinum' OR category='gold';
5) Select painting',owner'sname,monthly_rental_rates from Paintings ORDER BY monthly_rental_rates ASC;
Here I am giving queries in SQL only not oracle.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.