0% found this document useful (4 votes)
734 views

SQL Test

The document describes a database called "Cellphones Information" that contains details on cell phone sales, including manufacturer, model, customer, location, and transaction information. It provides 7 questions to write SQL queries to analyze the data, including finding the state that buys the most Samsung phones, transactions by model and location, average price by top 5 manufacturers, models in the top 5 from 2008-2010, customers spending over $500 on average in 2009, states with customers from 2005 to present, and manufacturers that sold in 2010 but not 2009.

Uploaded by

ytee
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (4 votes)
734 views

SQL Test

The document describes a database called "Cellphones Information" that contains details on cell phone sales, including manufacturer, model, customer, location, and transaction information. It provides 7 questions to write SQL queries to analyze the data, including finding the state that buys the most Samsung phones, transactions by model and location, average price by top 5 manufacturers, models in the top 5 from 2008-2010, customers spending over $500 on average in 2009, states with customers from 2005 to present, and manufacturers that sold in 2010 but not 2009.

Uploaded by

ytee
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

SQL Test

Scenario: The database “Cellphones Information” contains details on cell phone sales or transactions.
Details stored are: Dim_Manufacturer, Dim_Model, Dim_Customer, Dim_Location and
Fact_Transactions. The first four store entries for the respective elements and Fact_Transactions stores
all the information about sales of specific cellphones.

Section A
Write queries to find out the following:
1. What state in the US is buying more 'Samsung' cell phones?Display state and number of cell
phone transactions, sort by state.
Keep in mind that some manufacturers can be stored in this format: “Name of Manufacturer -
Country Code” (e.g. Samsung – Chile, Samsung – Peru, Motorola – Brazil). Also, some of them
can be stored in uppercase or lowercase.
2. Show the number of transactions for each model per zip code per state. Display manufacturer,
model name, state and zip code, even if there are no transactions for a model. Sort by
manufacturer name.
3. Find out the average price for each model in the top 5 manufacturers in terms of sales quantity,
and order by average price;
4. List if there is any model tha was in the top 5 in terms of quantity, simultaneously in 2008, 2009
and 2010;
5. List the names of the customers and the average amount spent in 2009, where the average is
higher than 500.00;
6. List all the states in which we have customers who have bought cellsphones from 2005 til today;
7. Show the manufacturers that sold cell phones in 2010 but didn’t in 2009.

You might also like