Banner

 

Chapter 15
Skill Builders

Page 451
A national cinema chain has commissioned you to design a multidimensional database for its marketing department. What identifier and variable dimensions would you select?

Apply the basic prompts (Table 14-6)

Identifiers When date and time
Where Region
City
What Movie title
Rating
Genre
How reservation channel (phone, Web,booth)
Variables Outcomes Revenue
Adult tickets sold
Senior tickets sold
Child tickets sold
Adult price
Senior price
Child price
Concession sales
Weather
Page 455
Visit the book's Web site JPivot page, and use JPivot to answer the questions posed.
Page 460
Write SQL to answer each of the four preceding queries using the EXPED table, which is a sample of 1,000 sales transactions from The Expeditioner.
SELECT SUM(revenue) FROM exped

SELECT location, SUM(revenue) FROM exped
GROUP BY location

SELECT channel, SUM(revenue) FROM exped
GROUP BY channel

SELECT location, channel, SUM(revenue) FROM exped
GROUP BY location, channel
Page 461
Query the EXPED table to compute total revenue by location, channel, and item.
SELECT location, channel, item, DECIMAL(SUM(revenue),9)
FROM exped
GROUP BY GROUPING SETS (location, channel, item)
Page 462
Run the following query select channel, location, decimal(sum(revenue),9) from EXPED group by rollup (channel, location); How do the results differ from those for the preceding ROLLUP query?

Channel is listed before location.

 

This page is part of the promotional and support material for Data Management (fifth edition) by Richard T. Watson
For questions and comments please contact the author

Date revised: October 24, 2009