SlideShare uma empresa Scribd logo
1 de 4
SOLUTIONJUG.COM
CIS/336 iLab 6 of 7 - SQL Course
CLICK HERE TO GET THE SOLUTION !!!!!!!!
Oracle Single Row and Group Functions
L A B O V E R V I E W
Scenario/Summary
Lab #6 will introduce the various aspects of the Single-Row and Group Functions available in the
Oracle Database. Most functions can be used in either the SELECT statement or the WHERE clause,
but more commonly are used in the SELECT. Chapters 5 and 6 cover most all of the normal
processing you use in these functions. In some cases, you will be asked to used more than one
function within a single SELECT statement.
General Lab Information and Considerations
This lab will utilize the same set of tables found in the script file (LeeBooks.SQL) that were used for
Labs 4 and 5.
Each query in the script file you will create must be numbered (use --1 comments for numbering)
and in order. The SQL for the following exercises should be written using notepad and run in
SQL*Plus. 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
Oracle when creating your script file to check your queries and verify if they work or not. However,
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, with echo to create the document, you can turn in
with your lab. Remember in using a spool session, you must type "SPOOL OFF" at the SQL> prompt
after your script stops spooling to capture all of your data!
Lab Do's and Don’t's
• Do Not include the LEEBOOKS.SQL as part of your lab script.
o Do use Notepad to write your query script file.
• Do Not write your queries in Word.
o Do test each query before moving on to the next.
• Do Not include extra queries for a problem unless the problem explicitly asks for more
than one query.
o Do test your queries before creating your final output file.
• Do Not turn in a script file that has queries with errors.
o Do number each query using - -1 comment notation.
• Do Not start your query on the same line as the comment.
o Do remember to check your final output and script file for accuracy.
• Do Not turn in your lab without first checking your output file to verify that it is correct.
Things to keep in mind:
If you are not sure of the table names in your user schema, you can use the following select
statement to list them.
SELECT * FROM TAB;
If you want to know the name of the columns in a particular table you can use the following
command to list them.
DESC
Making a script file containing a series of describe statements for each table and then spooling the
output will give you a listing of all the tables with column names.
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 in the steps below that will return a result set of data
to satisfy the requirements. When finished, your script file should have a total of 13 queries, and
your resulting output file should show both the query and result set for each.
Deliverables
Submit for grading:
1. Your script file with the 13 queries in it. Be sure your name, course number, and lab
number are in a comment area at the top of your file.
2. An output file created using SET ECHO ON showing both the SQL code and the results.
3. Both documents are to be zipped into a single file before submitting to the iLab Dropbox
for Week 6.
L A B S T E P S
STEP 1:
Using the BOOK_CUSTOMER table and the NVL function, create a query that will return a list
containing the customer number, first name, last name, and the characters ‘NOT REFERRED’ if the
customer was not referred by another customer. Give the derived column an alias of REFERRED BY.
Do not list any customers that were referred by another customer.
STEP 2:
Using the BOOKS table and the SUBSTR function, create a query that will return a list of book ISBN
codes and the book title for all the computer books. Format the ISBN code to display as 9-999-
99999-9 (e.g., 1059831198 would display as 1-059-83119-8)
STEP 3:
Using the BOOKS table, create a query using the correct functions to return the category name, the
total retail of all books per category with a column alias of "Total Retail", and the average retail of all
the books per category with an alias of "Average Retail" for all categories with a total retail greater
than $40.00. Format the total retail and average retail columns using the correct function to show
dollars and cents with a dollar sign.
STEP 4:
Using the correct tables in your schema, create a query using either join operation you wish that will
list the book title and number of authors for all books that have been written by more than one
author. Give the title column an alias of "Book Title" and the column showing the number of authors
an alias of "Number of Authors".
STEP 5:
Using the BOOK_AUTHOR and AUTHOR tables for the upper most query, create a sub query that
will return the BOOKID, and the first and last name of the author(s) who have written the book(s)
that have been purchased the most. To successfully accomplish this, you will need to first find out
the maximum total number of copies (based on quantity) sold of a book (based on bookid) in the
ORDER_ITEMS table. This will be done in the bottom most query. The return from this query will be
used to compare against the BOOKID in the ORDER_ITEMS table that occurs an equal number of
times in the middle query. The return of this query will then be used to compare to a BOOKID
related to an Author in the tables of the top most query. (HINT: Be careful, you will need both
GROUP BY and HAVING clauses for your solution.)
STEP 6:
Using the correct tables, create a sub query using either join operation you wish that will list the
customer number, first and last name concatenated together, and city for all customers who have
placed an order for the most expensive book (based on retail price). Give the combined customer
names column and alias of "Customer Name".
STEP 7:
Using the ORDER_ITEMS table, create a query using the correct functions to return the item#, the
total quantity of items ordered with an alias of "Total", the average quantity per order with an alias
of "Average" (since averages are often in decimals, only show two decimal places), the minimum
quantity ordered with an alias of "Minimum", and the maximum quantity ordered with an alias of
"Maximum". Your output results set should have five columns and four rows of data.
STEP 8:
Using the BOOKS table, create a query using the DECODE function that will display the book title,
the published date, and the publisher name (this is where the decode function comes in). Give the
publisher name column an alias of "Publisher Name", and order the publisher names in descending
order. The publisher names used should be the same as those in the PUBLISHER table. DO NOT join
to the Publisher table for this query.
STEP 9:
Using the PUBLISHER table, create a query that will return a line of output like the one below for
each record in the table. Be sure to use the correct functions in the SELECT statement, so that your
output looks like the example below.
The contact person for Printing Is Us Publishing is Tommie Seymour.
Be sure to use the correct function to display the publisher name and publisher contact with only the
first letter of each word capitalized.
STEP 10:
Using the correct tables, create a query using the JOIN ON method to display a listing of all
customers who have purchased more than two books. List the customer’s last name, the customer’s
city and state, and the number of books they have purchased. Give the number purchased column
and alias of "Number Purchased".
STEP 11:
Using only the BOOK table for the upper most statement, create a sub query that will update the
retail price of all books published by PRINTING IS US by five percent (retail * 1.05). Remember, all
you have is the publisher "name". Use the sub query to find the publisher ID. To verify your update,
provide a select statement on the BOOKS table before your update statement, and then a second
select on the BOOKS table after the update. Once you have verified the results, you can issue a
ROLLBACK statement to return the data to the original state.
STEP 12:
Using the BOOK_CUSTOMER table, write a sub query that will return the names of those customers
who were referred by the same individual who referred Jorge Perez. Do not display Jorge Perez’s
name in the returned results (Hint: you should only have two customers displayed and the exclusion
for Jorge Perez must be associated with the upper query).
STEP 13:
Using the BOOKS table, create a query using the correct functions to return the category name, total
number books per category with a column alias of "Category Total", and the total cost of 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.
This is the end of Lab #6
CLICK HERE TO GET THE SOLUTION !!!!!!!!

Mais conteúdo relacionado

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Cis 336 ilab 6 of 7

  • 1. SOLUTIONJUG.COM CIS/336 iLab 6 of 7 - SQL Course CLICK HERE TO GET THE SOLUTION !!!!!!!! Oracle Single Row and Group Functions L A B O V E R V I E W Scenario/Summary Lab #6 will introduce the various aspects of the Single-Row and Group Functions available in the Oracle Database. Most functions can be used in either the SELECT statement or the WHERE clause, but more commonly are used in the SELECT. Chapters 5 and 6 cover most all of the normal processing you use in these functions. In some cases, you will be asked to used more than one function within a single SELECT statement. General Lab Information and Considerations This lab will utilize the same set of tables found in the script file (LeeBooks.SQL) that were used for Labs 4 and 5. Each query in the script file you will create must be numbered (use --1 comments for numbering) and in order. The SQL for the following exercises should be written using notepad and run in SQL*Plus. 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 Oracle when creating your script file to check your queries and verify if they work or not. However, 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, with echo to create the document, you can turn in with your lab. Remember in using a spool session, you must type "SPOOL OFF" at the SQL> prompt after your script stops spooling to capture all of your data! Lab Do's and Don’t's • Do Not include the LEEBOOKS.SQL as part of your lab script. o Do use Notepad to write your query script file. • Do Not write your queries in Word. o Do test each query before moving on to the next. • Do Not include extra queries for a problem unless the problem explicitly asks for more than one query. o Do test your queries before creating your final output file. • Do Not turn in a script file that has queries with errors. o Do number each query using - -1 comment notation. • Do Not start your query on the same line as the comment.
  • 2. o Do remember to check your final output and script file for accuracy. • Do Not turn in your lab without first checking your output file to verify that it is correct. Things to keep in mind: If you are not sure of the table names in your user schema, you can use the following select statement to list them. SELECT * FROM TAB; If you want to know the name of the columns in a particular table you can use the following command to list them. DESC Making a script file containing a series of describe statements for each table and then spooling the output will give you a listing of all the tables with column names. 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 in the steps below that will return a result set of data to satisfy the requirements. When finished, your script file should have a total of 13 queries, and your resulting output file should show both the query and result set for each. Deliverables Submit for grading: 1. Your script file with the 13 queries in it. Be sure your name, course number, and lab number are in a comment area at the top of your file. 2. An output file created using SET ECHO ON showing both the SQL code and the results. 3. Both documents are to be zipped into a single file before submitting to the iLab Dropbox for Week 6. L A B S T E P S STEP 1: Using the BOOK_CUSTOMER table and the NVL function, create a query that will return a list containing the customer number, first name, last name, and the characters ‘NOT REFERRED’ if the customer was not referred by another customer. Give the derived column an alias of REFERRED BY. Do not list any customers that were referred by another customer. STEP 2: Using the BOOKS table and the SUBSTR function, create a query that will return a list of book ISBN codes and the book title for all the computer books. Format the ISBN code to display as 9-999- 99999-9 (e.g., 1059831198 would display as 1-059-83119-8) STEP 3: Using the BOOKS table, create a query using the correct functions to return the category name, the total retail of all books per category with a column alias of "Total Retail", and the average retail of all the books per category with an alias of "Average Retail" for all categories with a total retail greater than $40.00. Format the total retail and average retail columns using the correct function to show dollars and cents with a dollar sign. STEP 4: Using the correct tables in your schema, create a query using either join operation you wish that will list the book title and number of authors for all books that have been written by more than one author. Give the title column an alias of "Book Title" and the column showing the number of authors an alias of "Number of Authors". STEP 5:
  • 3. Using the BOOK_AUTHOR and AUTHOR tables for the upper most query, create a sub query that will return the BOOKID, and the first and last name of the author(s) who have written the book(s) that have been purchased the most. To successfully accomplish this, you will need to first find out the maximum total number of copies (based on quantity) sold of a book (based on bookid) in the ORDER_ITEMS table. This will be done in the bottom most query. The return from this query will be used to compare against the BOOKID in the ORDER_ITEMS table that occurs an equal number of times in the middle query. The return of this query will then be used to compare to a BOOKID related to an Author in the tables of the top most query. (HINT: Be careful, you will need both GROUP BY and HAVING clauses for your solution.) STEP 6: Using the correct tables, create a sub query using either join operation you wish that will list the customer number, first and last name concatenated together, and city for all customers who have placed an order for the most expensive book (based on retail price). Give the combined customer names column and alias of "Customer Name". STEP 7: Using the ORDER_ITEMS table, create a query using the correct functions to return the item#, the total quantity of items ordered with an alias of "Total", the average quantity per order with an alias of "Average" (since averages are often in decimals, only show two decimal places), the minimum quantity ordered with an alias of "Minimum", and the maximum quantity ordered with an alias of "Maximum". Your output results set should have five columns and four rows of data. STEP 8: Using the BOOKS table, create a query using the DECODE function that will display the book title, the published date, and the publisher name (this is where the decode function comes in). Give the publisher name column an alias of "Publisher Name", and order the publisher names in descending order. The publisher names used should be the same as those in the PUBLISHER table. DO NOT join to the Publisher table for this query. STEP 9: Using the PUBLISHER table, create a query that will return a line of output like the one below for each record in the table. Be sure to use the correct functions in the SELECT statement, so that your output looks like the example below. The contact person for Printing Is Us Publishing is Tommie Seymour. Be sure to use the correct function to display the publisher name and publisher contact with only the first letter of each word capitalized. STEP 10: Using the correct tables, create a query using the JOIN ON method to display a listing of all customers who have purchased more than two books. List the customer’s last name, the customer’s city and state, and the number of books they have purchased. Give the number purchased column and alias of "Number Purchased". STEP 11: Using only the BOOK table for the upper most statement, create a sub query that will update the retail price of all books published by PRINTING IS US by five percent (retail * 1.05). Remember, all you have is the publisher "name". Use the sub query to find the publisher ID. To verify your update, provide a select statement on the BOOKS table before your update statement, and then a second
  • 4. select on the BOOKS table after the update. Once you have verified the results, you can issue a ROLLBACK statement to return the data to the original state. STEP 12: Using the BOOK_CUSTOMER table, write a sub query that will return the names of those customers who were referred by the same individual who referred Jorge Perez. Do not display Jorge Perez’s name in the returned results (Hint: you should only have two customers displayed and the exclusion for Jorge Perez must be associated with the upper query). STEP 13: Using the BOOKS table, create a query using the correct functions to return the category name, total number books per category with a column alias of "Category Total", and the total cost of 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. This is the end of Lab #6 CLICK HERE TO GET THE SOLUTION !!!!!!!!