Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Database Assignment Instructions: Login to our database server through ssh from you terminal: Type following command: mysql -u student -h tim50.soe.ucsc.edu tim50 Use the database
Database Assignment
Instructions:
- Login to our database server through ssh from you terminal:
- Type following command: mysql -u student -h tim50.soe.ucsc.edu tim50
- Use the database Assg1 for assignment. To access the database type the following command in terminal: use Assg1;
- Students can also install mysql work bench and do their assignments. Link is given below. Mysql workbench is also installed in the BE109 lab.
https://dev.mysql.com/downloads/workbench/. (Links to an external site.)Links to an external site.
- In a WORD compatible document and for each question:
- State the question
- Write the SQL query to answer the question
- Paste a section of the results from your query (copy from display)
- Save your .sql files corresponding to each query. For example save query1.sql containing the query for first question. You have to create such six .sql files.
- Upload your completed assignment with all the above files in a zip file
Questions to Answer
- Find the most five expensive books. Display in decreasing order and show their Bookid and BookName for each one of them .
- Find the names of the books with authors whose name consist of charachter 'S'. Also print their corresponding Author name.
- Find the number of books published under a Publisher. Display the publisher name and count of books published, in decreasing order.
- Find all books with category 'F' such that their price is less than 501.50. Also show author name and publisher name. No dupicates are allowed.
- Display the name of the books and their corresponding reviewers satisfying the following conditions:
1.The review stars should be more than 3.
2.The review date should be after 2005;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started