SQLTeam.com | Weblogs | Forums

Urgent : SQL Query Help


#1

Hi,

Please help me in the following queries:

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.

Object Structure : Please find it here :

Need queries for 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.

  1. 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.

  2. Find out the average price for each model in the top 5 manufacturers in terms of sales quantity, and order by average price;

  3. List if there is any model that was in the top 5 in terms of quantity, simultaneously in 2008, 2009 and 2010;

  4. List the names of the customers and the average amount spent in 2009, where the average is higher than 500.00;

  5. List all the states in which we have customers who have bought cellphones from 2005 till today;

  6. Show the manufacturers that sold cell phones in 2010 but didn’t in 2009.

It is urgent, I am very thankful if you can respond immediately with the queries.

Thanks a lot!
Akriti.


#2

We don't do homework here.

Post what you have tried or any specific question that you need help with.


#3

Hello , I have to attempt a similar question .
Could u please guide me about how to proceed with this .
I mean i will attempt the queries myself , i just want to know that with the given data , where we are only provided with a schema diagram .
How should i proceed . There are no detailed tables with any records . How will i extract the data as expected in the queries ?