Home » SQL & PL/SQL » SQL & PL/SQL » Period to Period Comparison (Oracle 10g)
Period to Period Comparison [message #283497] Tue, 27 November 2007 05:56 Go to next message
muhammadaqeel
Messages: 13
Registered: November 2006
Location: Jeddah Saudi Arabia
Junior Member

Asslam o alaikum All,

I have created a materialized view containing two years of sales data

following is the structure
product_code         e.g. 1000
product_name         e.g. XXXX  
year                 e.g. 2005
quarter                   01-05
month                     Jan-05
week                      01-05
dat                       01-JAN-2005
daily_sales               100
weekly_sales              300
monthly_sales             7000
yearly_sales              12000
 

Now i am using sql analytical function to generate following results
product,dat,daily_sales, Previous Day Sale,weekly_sales,previous_week_sales
and similarly for month , quarter and year.

In short I want period to period comparison on each level of time hierarchy for each date

Please help me out
regards,
Muhammad aqeel

[Edit by Taj: Add Code Tags]

[Updated on: Tue, 27 November 2007 07:09] by Moderator

Report message to a moderator

Re: Period to Period Comparison [message #283502 is a reply to message #283497] Tue, 27 November 2007 06:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What did you already do and what do you want to do?
This is not clear from your post.

In addtion,
Read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Always post your Oracle version (4 decimals).

Regards
Michel
Re: Period to Period Comparison [message #283518 is a reply to message #283502] Tue, 27 November 2007 06:55 Go to previous messageGo to next message
muhammadaqeel
Messages: 13
Registered: November 2006
Location: Jeddah Saudi Arabia
Junior Member

this is not for you if you cant understand; there is no row of code or anything that i should format it. its a simple text.
Re: Period to Period Comparison [message #283519 is a reply to message #283518] Tue, 27 November 2007 06:58 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
OK if you don't want my help, it does not worry me, I have no problem.

Regards
Michel
Re: Period to Period Comparison [message #283520 is a reply to message #283497] Tue, 27 November 2007 07:09 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Quote:

Now i am using sql analytical function to generate following results
product,dat,daily_sales, Previous Day Sale,weekly_sales,previous_week_sales
and similarly for month , quarter and year.

Show us how you have used the analytic functions to generate the following results and what you actually need. Michel is quite right in that your requirements are not clear, so how about you bear in mind that you are the one asking for a favour, not anyone else. Others are offering their expertise free of charge, so click on the link that Michel supplied and follow the very first bullet point (along with the other relevant points too.)
Re: Period to Period Comparison [message #283545 is a reply to message #283497] Tue, 27 November 2007 07:49 Go to previous messageGo to next message
muhammadaqeel
Messages: 13
Registered: November 2006
Location: Jeddah Saudi Arabia
Junior Member

My brother if you don't know the basics; don't try to be a guru.
if you can reply then its a pleasure for me and if you don't want to reply then i would say thanks; I don't need your favor. A person who has the expertise up to a certain level can easily understand the question. I am not very much expert so I put the question.if you cant answer then don't come up with lame excuses
Re: Period to Period Comparison [message #283546 is a reply to message #283545] Tue, 27 November 2007 07:54 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Laughing Good luck. I will have nothing more to do with you.
Re: Period to Period Comparison [message #283553 is a reply to message #283545] Tue, 27 November 2007 08:07 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
muhammadaqeel wrote on Tue, 27 November 2007 14:49

My brother if you don't know the basics; don't try to be a guru.


What basics? About SQL? Or how to get a decent post on this forum?

Compare the number of posts you have made against the number of posts of Michael Cadot and a few others, and spare a few moments of deep thinking Wink

muhammadaqeel wrote on Tue, 27 November 2007 14:49

A person who has the expertise up to a certain level can easily understand the question. I am not very much expert so I put the question.if you cant answer then don't come up with lame excuses


AFCAQTWCA
Re: Period to Period Comparison [message #283557 is a reply to message #283545] Tue, 27 November 2007 08:10 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From your profile:
Quote:

Biography: about me.......... i am nothing so nothing about me

You're on the way to stay at your level.

Regards
Michel
Previous Topic: type mismatch found at 'LOAD_CV' between FETCH cursor and INTO variables
Next Topic: Declare date and BEGIN problem
Goto Forum:
  


Current Time: Mon Dec 05 13:01:42 CST 2016

Total time taken to generate the page: 0.32922 seconds