Database Systems: Design, Implementation, & Management
Database Systems: Design, Implementation, & Management
11th Edition
ISBN: 9781285196145
Author: Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher: Cengage Learning
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 13, Problem 12P

Using the answer to Problem 10 as your base, what command would you need to generate the same output but with subtotals in all columns? (Hint: Use the CUBE command.) Figure P13.12 shows the result of the query.

FIGURE P13.12 PROBLEM 12 RESULT

Chapter 13, Problem 12P, Using the answer to Problem 10 as your base, what command would you need to generate the same output

Blurred answer
Students have asked these similar questions
Task 2: The Driver Relationship team wants to ensure that the all driving license IDs in the active drivers table have the length of 7. Alter the ACTIVE_DRIVERS table created in Chapter 8, Activity 1 to check the length of the DRIVER_DRIVING_LICENSE_ID. Add a CHECK to the ACTIVE_DRIVERS table to enforce a driver license length of 7. Test Query: SELECT DISTINCT(constraint_name) FROM information_schema.check_constraints WHERE constraint_schema = 'InstantRide' AND constraint_name = 'ACTIVE_DRIVERS_chk_1'   Expected Results CONSTRAINT_NAME ACTIVE_DRIVERS_chk_1
Could you do typing the query here please?
Here are the previous steps that have been done before reaching the question below: step 1:  Task 1: Q1.Please write a query statement from emp table to display deptno 10’s empno, ename, sal, and a new_sal which is increase by 15% from the original sal (round the new_sal value to a whole number). Label the column headings to EMPNO, ENAME, SAL, and NEW_SAL.  Answer: SELECT empno, ename, sal, new_salFROM deptnoWHERE new_sal = orginal_sal * 1.15 ALTER TABLE deptnoRENAME COLUMN empno to EMPNO; ALTER TABLE deptnoRENAME COLUMN ename TO ENAME; ALTER TABLE deptnoRENAME COLUMN sal TO SAL; ALTER TABLE deptnoRENAME new_sal empno TO NEW_SAL;   step2: Task 2: Please write a query statement from emp table to display deptno 30’s empno, ename, sal, comm, and total_income which is a new column of the amount of sal + comm. Label the column heading to EMPNO, ENAME, SAL, COMM, TOTAL_INCOME. The result should be like below: Answer: ALTER TABLE deptnoADD total_income INT NOT NULL SELECT empno, ename,…
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
SQL Basics for Beginners | Learn SQL | SQL Tutorial for Beginners | Edureka; Author: edureka;https://www.youtube.com/watch?v=zbMHLJ0dY4w;License: Standard YouTube License, CC-BY