


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Database systems management project queries
Typology: Exercises
1 / 4
This page cannot be seen from the preview
Don't miss anything!
You will need to run the books.sql script to create the tables needed for this lab. Download it from Blackboard and run it in MySQL. Each query in the script file you will create must be numbered (use either -- 1 or # 1 comments for numbering) and in order. The SQL for the following exercises can be written using notepad and run in MySQL. Read each problem carefully and follow the directions as stated. A CLEAN SCRIPT FILE: A script file is meant to be like a program. The file can be run every time the code needs to be executed without having to retype the code again each time. For this reason it is important that there are no errors in the code inside the file. You can go back and forth between notepad and MySQL when creating your script file to check your queries and verify if they work or not, but you do not want to create your final output file until after you have verified that everything in your script is correct by running it in its entirety at least once and viewing the output. Once this has been done, you can create your final output file, by choosing “Query” from the menu and choosing “Execute (ALL or Selection) to text” Things to keep in mind: If you are not sure of the table names in your user schema you can use the following statement to list them. SHOW TABLES; If you want to know the name of the columns in a particular table you can use the following command to list them. DESC tableName ; Be sure to review and verify your final output when you are finished. DO NOT assume anything. Write queries for each of the stated problems below that will return a result set of data to satisfy the requirements. When finished, your script file should have a total of 24 queries and your resulting output file should show both the query and result set for each. Submit both the script file and the output file as a single zip file to the dropbox. Queries 1 through 20 are 8 points each and queries 21 through 24 are 10 points each. Each query is graded both on following directions and correctness.
all the books per category with an alias of ‘Cost’. Format the cost column using the correct function to show dollars and cents with a dollar sign.