time series data - Mailing list pgsql-sql
From | azwa@nc.com.my |
---|---|
Subject | time series data |
Date | |
Msg-id | OF79EF187C.A5E0B2D9-ONFFFFFF50.004B0C31@nc.com.my Whole thread Raw |
Responses |
Re: time series data
|
List | pgsql-sql |
<br /><br /><font face="Times New Roman" size="2">Hi,</font><br /><br /><br /><font face="Times New Roman" size="2"> iwant to create time table & the structure as below :</font><br /><br /><font face="Times New Roman" size="2"> </font><table border="border"><tr valign="top"><td><font face="sans-serif" size="2">Column</font></td><td><fontface="sans-serif" size="2"> Type</font></td><td><font face="sans-serif" size="2"> Modifiers</font></td></tr><trvalign="top"><td><font face="sans-serif" size="2">time_key</font><br /><font face="sans-serif"size="2">yr_id</font><br /><font face="sans-serif" size="2">month_id</font><br /><font face="sans-serif"size="2">month_desc</font><br /><font face="sans-serif" size="2">day_id</font></td><td><font face="sans-serif"size="2"> integer</font><br /><font face="sans-serif" size="2"> integer</font><br /><font face="sans-serif"size="2"> integer</font><br /><font face="sans-serif" size="2"> text</font><br /><font face="sans-serif"size="2"> integer</font></td><td><font face="sans-serif" size="2"> not null default nextval('time_seq'::text)</font></td></tr></table><br/><br /><br /><font face="Times New Roman" size="2">Example of datain time table:</font><br /><table border="border"><tr valign="top"><td><font face="Times New Roman" size="2">Time_key</font></td><td><fontface="Times New Roman" size="2"> yr_id</font></td><td><font face="Times New Roman"size="2"> month_id</font></td><td><font face="Times New Roman" size="2"> month_desc</font></td><td><font face="TimesNew Roman" size="2"> day_id</font></td></tr><tr valign="top"><td></td><td><font face="Times New Roman" size="2"> 1999</font></td><td><fontface="Times New Roman" size="2"> 1</font></td><td><font face="Times New Roman" size="2"> Jan</font></td><td><font face="Times New Roman" size="2"> 1</font></td></tr><tr valign="top"><td></td><td><fontface="Times New Roman" size="2"> 1999</font></td><td><font face="Times New Roman" size="2"> 1</font></td><td><font face="Times New Roman" size="2"> Jan</font></td><td><font face="Times New Roman" size="2"> 2</font></td></tr><tr valign="top"><td></td><td><font face="Times New Roman" size="2"> 2000</font></td><td><fontface="Times New Roman" size="2"> 1</font></td><td><font face="Times New Roman" size="2"> Jan</font></td><td><font face="Times New Roman" size="2"> 1</font></td></tr></table><br /><br /><br /><font face="TimesNew Roman" size="2">time_key data will keep increment reading from sequence. i'm going to have a data from yr_id=1994 --> 2009 , month_id =1 -->12 </font><br /><font face="Times New Roman" size="2">and day_id =1 -->31 foreach month. So is there any solution (using function, or else) that can give me the above data</font><br /><font face="TimesNew Roman" size="2"> in Postgresql??. </font><br /><br /><font face="Times New Roman" size="2"> thanks in advance.</font>