Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: for the sql script file that you create please create an author block at the top similar to what is shown below. Also if

Note: for the sql script file that you create please create an author block at the top similar to what is shown below. Also if you are answering specific questions or problems, please include a comment about which one it is.
Example: (note that starting a line with --(no space) indicates that the remainder of the line is a comment
----------------------------------------------------------
-- CarolinaPublishing Queries:
-- Query answers for Homework 4
--
-- Author: Clint Fuchs
-- Course: CSCI 225
-- Assignment: 4
-- Date: 7/10/2024
-- Version: 1.0
----------------------------------------------------------
--1. problem description
SELECT ---
--2. problem
SELECT ---
Note: you will lose points if you don't include comments for the header AND for each individual problem!
Part 2: Queries
Next, create your own sql script file named CarolinaPublishingQueries.sql to be used to create queries to accomplish the following:
1. Display the first and last name along with the phone number of all Agents.
2. Display the Editor name for all Editors sorted by last name and first name (in that order).
3. Display the Book titles, author name, and number of pages for all Books with more than 1000 pages.
4. Display the number of Authors who do NOT have Agents.
5. Display the total number of Books that contain how to in the title.
6. Display the Authors first and last name and their Agents first and last name for all Authors whose last name starts with the same first letter of your last name (if no match try the first letter of your first name if still no match try Agent or Editor).
7. Display the Book title and Author first and last name of the Books whose genre is either Educational or History.
8. Display the Authors first and last name, Books title and genre, Editors first and last name for all Books that are in the Biography genre.
9. Display each Editors first and last name along with their mentors first and last name with column headers MentorFirstName and MentorLastName respectively.
10. Display the Editors first and last name, as well as the Books title sorted by Books title first and the Editors last name second for all Books that were published on September 16,2006.
11. Display the Editors first and last name along with their ID for the Editor(s) that has edited at least one Book with the least number of pages.
12. Display each Authors ID, first and last names and the total number of pages for all of the Books they have written.
13. Display each Book genre as well as the number of Books written in that genre with the column header Number Of Books
14. Display the Authors first and last name, as well as their ID, and the Book title and number of pages for all of the books they have written that have more than the average number of pages for all of the books that have been written, listed by authors first and last name along with the book title, and the books number of pages.
15. Display the Authors ID, first and last name, and that Author's Edtior ID, and first and last name of the Author who has the most Books in the Carolina Publishing database (this one is a tough one).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions