PostgreSQL - Data Warehouse - Time Dimensions
Comments
 Share
The version of the browser you are using is no longer supported. Please upgrade to a supported browser.Dismiss

 
Comment only
 
 
Still loading...
ABCDEFGHIJKLMNOPQRSTUV
1
Read sheet "About" to understand how it works.Start1.1.2001Index Name Prefixcal
2
PostgreSQL Date Dimension DesignerEnd31.12.2019
3
Physical namepublic.dateRows6 939Special Row KeySpecial Row KeySpecial Row Key
4
-1-2
5
Fixed NameLogical NameUseUpdate NeededIndexPhysical NameData TypeColumn ExpressionCreate Table StatementInsert StatementUpdate StatementCreate IndexSpecial Value -1Special Value -2Special Value
6
drop table if exists public.date; create table public.date(insert into public.date select insert into public.date values(insert into public.date values(insert into public.date values(
7
<<Key>>KeyYtime_keysmallintidtime_key smallint PRIMARY KEYid as time_key-1-2
8
<<Date>>DateYYtime_datedateinput_date, time_date date,input_date as time_datecreate index cal_time_date on public.date (time_date),'1900-01-01','1900-01-01'
9
<<IsYesterday>>Is YesterdayYYYis_yesterdaybooleaninput_date = current_date - 1, is_yesterday boolean,input_date = current_date - 1 as is_yesterdayupdate public.date set is_yesterday = time_date = current_date - 1;create index cal_is_yesterday on public.date (is_yesterday) where is_yesterday;,FALSE,FALSE
10
<<IsToday>>Is TodayYYYis_todaybooleaninput_date = current_date, is_today boolean,input_date = current_date as is_todayupdate public.date set is_today = time_date = current_date;create index cal_is_today on public.date (is_today) where is_today;,FALSE,FALSE
11
<<IsTomorrow>>Is TomorrowYYYis_tomorrowbooleaninput_date = current_date +1, is_tomorrow boolean,input_date = current_date +1 as is_tomorrowupdate public.date set is_tomorrow = time_date = current_date +1;create index cal_is_tomorrow on public.date (is_tomorrow) where is_tomorrow;,FALSE,FALSE
12
<<DayofYear>>Day of YearYdoysmallintto_char(input_date, 'DDD')::smallint, doy smallint,to_char(input_date, 'DDD')::smallint as doy,-1,-1
13
<<DayofHalfyear>>Day of HalfyearYdohsmallintcase
when extract(month from input_date) <= 6 then to_char(input_date,'DDD')::smallint
else input_date - (extract(year from input_date) || '-07-01')::date + 1 end
, doh smallint,case when extract(month from input_date) <= 6 then to_char(input_date,'DDD')::smallint else input_date - (extract(year from input_date) || '-07-01')::date + 1 end as doh,-1,-1
14
<<DayofQuarter>>Day of QuarterYdoqsmallint(input_date::date - date_trunc('quarter', input_date)::date +1)::smallint, doq smallint,(input_date::date - date_trunc('quarter', input_date)::date +1)::smallint as doq,-1,-1
15
<<DayofMonth>>Day of MonthYdomsmallint(extract(day from input_date))::smallint, dom smallint,(extract(day from input_date))::smallint as dom,-1,-1
16
<<DayofWeek>>Day of WeekYdowsmallint(extract(isodow from input_date))::smallint, dow smallint,(extract(isodow from input_date))::smallint as dow,-1,-1
17
<<DayofWeekShortName>>Day of Week Short NameYdow_short_namevarcharsubstr(to_char(current_date,'Day'),1,3)
, dow_short_name varchar,substr(to_char(current_date,'Day'),1,3) as dow_short_name,'Unknown','Undefined'
18
<<DayofWeekShortNameLoc>>Day of Week Short Name CSYdow_short_name_csvarcharcase extract(isodow from input_date) when 1 then 'Po' when 2 then 'Út' when 3 then 'St' when 4 then 'Čt' when 5 then 'Pá' when 6 then 'So' when 7 then 'Ne' end, dow_short_name_cs varchar,case extract(isodow from input_date) when 1 then 'Po' when 2 then 'Út' when 3 then 'St' when 4 then 'Čt' when 5 then 'Pá' when 6 then 'So' when 7 then 'Ne' end as dow_short_name_cs,'Neznámé','Nedefinované'
19
<<DayofWeekLongName>>Day of Week Long NameYdow_long_namevarcharto_char(input_date,'Day'), dow_long_name varchar,to_char(input_date,'Day') as dow_long_name,'Unknown','Undefined'
20
<<DayofWeekLongNameLoc>>Day of Week Long Name CSYdow_long_name_csvarcharcase extract(isodow from input_date) when 1 then 'Pondělí' when 2 then 'Úterý' when 3 then 'Středa' when 4 then 'Čtvrtek' when 5 then 'Pátek' when 6 then 'Sobota' when 7 then 'Neděle' end, dow_long_name_cs varchar,case extract(isodow from input_date) when 1 then 'Pondělí' when 2 then 'Úterý' when 3 then 'Středa' when 4 then 'Čtvrtek' when 5 then 'Pátek' when 6 then 'Sobota' when 7 then 'Neděle' end as dow_long_name_cs,'Neznámé','Nedefinované'
21
<<DaysinWeek>>Days in WeekYdiwsmallint7, diw smallint,7 as diw,-1,-1
22
<<DaysinMonth>>Days in MonthYdimsmallint(date_trunc('month', input_date) + interval '1 month')::date - date_trunc('month', input_date)::date, dim smallint,(date_trunc('month', input_date) + interval '1 month')::date - date_trunc('month', input_date)::date as dim,-1,-1
23
<<DaysinQuarter>>Days in QuarterYdiqsmallint(date_trunc('quarter', input_date) + interval '3 months')::date - date_trunc('quarter', input_date)::date, diq smallint,(date_trunc('quarter', input_date) + interval '3 months')::date - date_trunc('quarter', input_date)::date as diq,-1,-1
24
<<DaysinHalfyear>>Days in HalfyearYdihsmallintcase
when extract(month from input_date) <= 6 then (date_trunc('year', input_date)::date + interval '6 months')::date - date_trunc('year', input_date)::date
else (date_trunc('year', input_date) + interval '1 year')::date - (extract(year from input_date) || '-07-01')::date
end
, dih smallint,case when extract(month from input_date) <= 6 then (date_trunc('year', input_date)::date + interval '6 months')::date - date_trunc('year', input_date)::date else (date_trunc('year', input_date) + interval '1 year')::date - (extract(year from input_date) || '-07-01')::date end as dih,-1,-1
25
<<DaysinYear>>Days in YearYdiysmallint(date_trunc('year', input_date) + interval '1 year')::date - date_trunc('year', input_date)::date, diy smallint,(date_trunc('year', input_date) + interval '1 year')::date - date_trunc('year', input_date)::date as diy,-1,-1
26
<<ReverseDayofWeek>>Reverse Day of WeekYrdowsmallint, rdow smallint,NULL,-1,-1
27
<<ReverseDayofMonth>>Reversse Day of MonthYrdomsmallint, rdom smallint,NULL,-1,-1
28
<<ReverseDayofQuarter>>Reverse Day of QuarterYrdoqsmallint, rdoq smallint,NULL,-1,-1
29
<<ReverseDayofHalfyear>>Reverse Day of HalfyearYrdohsmallint, rdoh smallint,NULL,-1,-1
30
<<ReverseDayofYear>>Reverse Day of YearYrdoysmallint, rdoy smallint,NULL,-1,-1
31
<<IsLast7days>>Is Last 7 daysYYYis_last_7dbooleaninput_date between current_date - interval '7 days' and current_date - interval '1 day', is_last_7d boolean,input_date between current_date - interval '7 days' and current_date - interval '1 day' as is_last_7dupdate public.date set is_last_7d = time_date between current_date - interval '7 days' and current_date - interval '1 day';create index cal_is_last_7d on public.date (is_last_7d) where is_last_7d;,FALSE,FALSE
32
<<IsLast14days>>Is Last 14 daysYYYis_last_14dbooleaninput_date between current_date - interval '14 days' and current_date - interval '1 day', is_last_14d boolean,input_date between current_date - interval '14 days' and current_date - interval '1 day' as is_last_14dupdate public.date set is_last_14d = time_date between current_date - interval '14 days' and current_date - interval '1 day';create index cal_is_last_14d on public.date (is_last_14d) where is_last_14d;,FALSE,FALSE
33
<<IsLast30days>>Is Last 30 daysYYYis_last_30dbooleaninput_date between current_date - interval '30 days' and current_date - interval '1 day', is_last_30d boolean,input_date between current_date - interval '30 days' and current_date - interval '1 day' as is_last_30dupdate public.date set is_last_30d = time_date between current_date - interval '30 days' and current_date - interval '1 day';create index cal_is_last_30d on public.date (is_last_30d) where is_last_30d;,FALSE,FALSE
34
<<IsLast90Days>>Is Last 90 DaysYYYis_last_90dbooleaninput_date between current_date - interval '90 days' and current_date - interval '1 day', is_last_90d boolean,input_date between current_date - interval '90 days' and current_date - interval '1 day' as is_last_90dupdate public.date set is_last_90d = time_date between current_date - interval '90 days' and current_date - interval '1 day';create index cal_is_last_90d on public.date (is_last_90d) where is_last_90d;,FALSE,FALSE
35
<<IsLast180Days>>Is Last 180 DaysYYYis_last_180dbooleaninput_date between current_date - interval '180 days' and current_date - interval '1 day', is_last_180d boolean,input_date between current_date - interval '180 days' and current_date - interval '1 day' as is_last_180dupdate public.date set is_last_180d = time_date between current_date - interval '180 days' and current_date - interval '1 day';create index cal_is_last_180d on public.date (is_last_180d) where is_last_180d;,FALSE,FALSE
36
<<IsLast365Days>>Is Last 365 DaysYYYis_last_365dbooleaninput_date between current_date - interval '365 days' and current_date - interval '1 day', is_last_365d boolean,input_date between current_date - interval '365 days' and current_date - interval '1 day' as is_last_365dupdate public.date set is_last_365d = time_date between current_date - interval '365 days' and current_date - interval '1 day';create index cal_is_last_365d on public.date (is_last_365d) where is_last_365d;,FALSE,FALSE
37
<<IsWeekday>>Is WeekdayYYis_weekdaybooleanextract(isodow from input_date) <= 5, is_weekday boolean,extract(isodow from input_date) <= 5 as is_weekdaycreate index cal_is_weekday on public.date (is_weekday) where is_weekday;,FALSE,FALSE
38
<<IsWeekend>>Is WeekendYYis_weekendbooleanextract(isodow from input_date) > 5, is_weekend boolean,extract(isodow from input_date) > 5 as is_weekendcreate index cal_is_weekend on public.date (is_weekend) where is_weekend;,FALSE,FALSE
39
<<WorkdayofWeek>>Workday of WeekYwdowsmallint, wdow smallint,NULL,-1,-1
40
<<WorkdayofMonth>>Workday of MonthYwdomsmallint, wdom smallint,NULL,-1,-1
41
<<WorkdayofQuarter>>Workday of QuarterYwdoqsmallint, wdoq smallint,NULL,-1,-1
42
<<WorkdayofHalfyear>>Workday of HalfyearYwdohsmallint, wdoh smallint,NULL,-1,-1
43
<<WorkdayofYear>>Workday of YearYwdoysmallint, wdoy smallint,NULL,-1,-1
44
<<ReverseWorkdayofWeek>>Reverse Workday of WeekYrwdowsmallint, rwdow smallint,NULL,-1,-1
45
<<ReverseWorkdayofMonth>>Reverse Workday of MonthYrwdomsmallint, rwdom smallint,NULL,-1,-1
46
<<ReverseWorkdayofQuarter>>Reverse Workday of QuarterYrwdoqsmallint, rwdoq smallint,NULL,-1,-1
47
<<ReverseWorkdayofHalfyear>>Reverse Workday of HalfyearYrwdohsmallint, rwdoh smallint,NULL,-1,-1
48
<<ReverseWorkdayofYear>>Reverse Workday of YearYrwdoysmallint, rwdoy smallint,NULL,-1,-1
49
<<WorkdaysinWeek>>Workdays in WeekYwdiwsmallint, wdiw smallint,NULL,-1,-1
50
<<WorkdaysinMonth>>Workdays in MonthYwdimsmallint, wdim smallint,NULL,-1,-1
51
<<WorkdaysinQuarter>>Workdays in QuarterYwdiqsmallint, wdiq smallint,NULL,-1,-1
52
<<WorkdaysinHalfyear>>Workdays in HalfyearYwdihsmallint, wdih smallint,NULL,-1,-1
53
<<WorkdaysinYear>>Workdays in YearYwdiysmallint, wdiy smallint,NULL,-1,-1
54
<<IsLastWorkdayinWeek>>Is Last Workday in WeekYYis_last_wd_in_weekboolean, is_last_wd_in_week boolean,NULLcreate index cal_is_last_wd_in_week on public.date (is_last_wd_in_week) where is_last_wd_in_week;,FALSE,FALSE
55
<<IsLastWorkdayinMonth>>Is Last Workday in MonthYYis_last_wd_in_monthboolean, is_last_wd_in_month boolean,NULLcreate index cal_is_last_wd_in_month on public.date (is_last_wd_in_month) where is_last_wd_in_month;,FALSE,FALSE
56
<<IsWorkday>>Is WorkdayYYis_workdayboolean, is_workday boolean,NULLcreate index cal_is_workday on public.date (is_workday) where is_workday;,FALSE,FALSE
57
<<IsHoliday>>Is HolidayYYis_holidaybooleanto_char(input_date, 'yyyymmdd') in ('','19940404','19950417','19960408','19970331','19980413','19990405','20000424','20010416','20020401','20030421','20040412','20050328','20060417','20070409','20080324','20090413','20100405','20110425','20120409','20130501','20140421','20150406','20160328','20170417','20180402','20190422','20200413','20210405','20220418','20230410','20240401','20250421','20260406','20270329','20280417','20290402','20300422','20310414','20320329','20330418','20340410') or to_char(input_date, 'mmdd') in ('','0101','0501','0508','0705','0706','0928','1028','1117','1224','1225','1226'), is_holiday boolean,to_char(input_date, 'yyyymmdd') in ('','19940404','19950417','19960408','19970331','19980413','19990405','20000424','20010416','20020401','20030421','20040412','20050328','20060417','20070409','20080324','20090413','20100405','20110425','20120409','20130501','20140421','20150406','20160328','20170417','20180402','20190422','20200413','20210405','20220418','20230410','20240401','20250421','20260406','20270329','20280417','20290402','20300422','20310414','20320329','20330418','20340410') or to_char(input_date, 'mmdd') in ('','0101','0501','0508','0705','0706','0928','1028','1117','1224','1225','1226') as is_holidaycreate index cal_is_holiday on public.date (is_holiday) where is_holiday;,FALSE,FALSE
58
<<IsFuture>>Is FutureYYYis_futurebooleaninput_date >= current_date, is_future boolean,input_date >= current_date as is_futureupdate public.date set is_future = time_date >= current_date;create index cal_is_future on public.date (is_future) where is_future;,FALSE,FALSE
59
<<IsPast>>Is PastYYYis_pastbooleaninput_date < current_date, is_past boolean,input_date < current_date as is_pastupdate public.date set is_past = time_date < current_date;create index cal_is_past on public.date (is_past) where is_past;,FALSE,FALSE
60
<<IsPreviousMonth>>Is Previous MonthYYYis_previous_monthbooleandate_trunc('month',input_date ) = date_trunc('month',current_date) - interval '1 month', is_previous_month boolean,date_trunc('month',input_date ) = date_trunc('month',current_date) - interval '1 month' as is_previous_monthupdate public.date set is_previous_month = date_trunc('month',time_date ) = date_trunc('month',current_date) - interval '1 month';create index cal_is_previous_month on public.date (is_previous_month) where is_previous_month;,FALSE,FALSE
61
<<IsCurrentMonth>>Is Current MonthYYYis_current_monthbooleandate_trunc('month',input_date ) = date_trunc('month',current_date), is_current_month boolean,date_trunc('month',input_date ) = date_trunc('month',current_date) as is_current_monthupdate public.date set is_current_month = date_trunc('month',time_date ) = date_trunc('month',current_date);create index cal_is_current_month on public.date (is_current_month) where is_current_month;,FALSE,FALSE
62
<<IsFollowingMonth>>Is Following MonthYYYis_following_monthbooleandate_trunc('month',input_date ) = date_trunc('month',current_date) + interval '1 month', is_following_month boolean,date_trunc('month',input_date ) = date_trunc('month',current_date) + interval '1 month' as is_following_monthupdate public.date set is_following_month = date_trunc('month',time_date ) = date_trunc('month',current_date) + interval '1 month';create index cal_is_following_month on public.date (is_following_month) where is_following_month;,FALSE,FALSE
63
<<IsMonthtoDate>>Is Month to DateYYYis_mtdbooleaninput_date between date_trunc('month',current_date) and current_date, is_mtd boolean,input_date between date_trunc('month',current_date) and current_date as is_mtdupdate public.date set is_mtd = time_date between date_trunc('month',current_date) and current_date;create index cal_is_mtd on public.date (is_mtd) where is_mtd;,FALSE,FALSE
64
<<IsBeginningofMonth>>Is Beginning of MonthYYYis_bomboolean extract(day from input_date) = 1, is_bom boolean, extract(day from input_date) = 1 as is_bomupdate public.date set is_bom = extract(day from time_date) = 1;create index cal_is_bom on public.date (is_bom) where is_bom;,FALSE,FALSE
65
<<IsEndofMonth>>Is End of MonthYYYis_eombooleanextract(month from input_date) <> extract(month from input_date + interval '1 day'), is_eom boolean,extract(month from input_date) <> extract(month from input_date + interval '1 day') as is_eomupdate public.date set is_eom = extract(month from time_date) <> extract(month from time_date + interval '1 day');create index cal_is_eom on public.date (is_eom) where is_eom;,FALSE,FALSE
66
<<IsPastMonth>>Is Past MonthYYYis_past_monthbooleaninput_date < date_trunc('month', input_date), is_past_month boolean,input_date < date_trunc('month', input_date) as is_past_monthupdate public.date set is_past_month = time_date < date_trunc('month', time_date);create index cal_is_past_month on public.date (is_past_month) where is_past_month;,FALSE,FALSE
67
<<BeginningofMonth>>Beginning of MonthYbomdatedate_trunc('month',input_date)::date, bom date,date_trunc('month',input_date)::date as bom,'1900-01-01','1900-01-01'
68
<<EndofMonth>>End of MonthYeomdate(date_trunc('month',input_date) + interval '1 month' - interval '1 day')::date, eom date,(date_trunc('month',input_date) + interval '1 month' - interval '1 day')::date as eom,'1900-01-01','1900-01-01'
69
<<MonthNumber>>Month NumberYmonth_numbersmallintextract(month from input_date)::smallint, month_number smallint,extract(month from input_date)::smallint as month_number,-1,-1
70
<<MonthNameLong>>Month Name LongYmonth_name_longvarcharto_char(date_trunc('month',input_date),'Month'), month_name_long varchar,to_char(date_trunc('month',input_date),'Month') as month_name_long,'Unknown','Undefined'
71
<<MonthNameLongLoc>>Month Name Long CSYmonth_name_long_csvarcharcase extract(month from input_date) when 1 then 'Leden' when 2 then 'Únor' when 3 then 'Březen' when 4 then 'Duben' when 5 then 'Květen' when 6 then 'Červen' when 7 then 'Červenec' when 8 then 'Srpen' when 9 then 'Září' when 10 then 'Říjen' when 11 then 'Listopad' when 12 then 'Prosinec' end, month_name_long_cs varchar,case extract(month from input_date) when 1 then 'Leden' when 2 then 'Únor' when 3 then 'Březen' when 4 then 'Duben' when 5 then 'Květen' when 6 then 'Červen' when 7 then 'Červenec' when 8 then 'Srpen' when 9 then 'Září' when 10 then 'Říjen' when 11 then 'Listopad' when 12 then 'Prosinec' end as month_name_long_cs,'Neznámé','Nedefinované'
72
<<MonthNameShort>>Month Name ShortYmonth_name_shortvarcharto_char(date_trunc('month',input_date),'Mon'), month_name_short varchar,to_char(date_trunc('month',input_date),'Mon') as month_name_short,'Unknown','Undefined'
73
<<MonthNameShortLoc>>Month Name Short CSYmonth_name_short_csvarcharcase extract(month from input_date) when 1 then 'led' when 2 then 'úno' when 3 then 'bře' when 4 then 'dub' when 5 then 'kvě' when 6 then 'čen' when 7 then 'čec' when 8 then 'srp' when 9 then 'zář' when 10 then 'říj' when 11 then 'lis' when 12 then 'pro' end, month_name_short_cs varchar,case extract(month from input_date) when 1 then 'led' when 2 then 'úno' when 3 then 'bře' when 4 then 'dub' when 5 then 'kvě' when 6 then 'čen' when 7 then 'čec' when 8 then 'srp' when 9 then 'zář' when 10 then 'říj' when 11 then 'lis' when 12 then 'pro' end as month_name_short_cs,'Neznámé','Nedefinované'
74
<<MonthofQuarter>>Month of QuarterYmoqsmallintextract(month from input_date) - (extract(quarter from input_date) - 1) * 3, moq smallint,extract(month from input_date) - (extract(quarter from input_date) - 1) * 3 as moq,-1,-1
75
<<MonthofHalfyear>>Month of HalfyearYmohsmallintextract(month from input_date) - case when extract(month from input_date) > 6 then 6 else 0 end, moh smallint,extract(month from input_date) - case when extract(month from input_date) > 6 then 6 else 0 end as moh,-1,-1
76
<<IsPreviousWeek>>Is Previous WeekYYYis_previous_weekbooleandate_trunc('week',input_date ) = date_trunc('week',current_date) - interval '1 week', is_previous_week boolean,date_trunc('week',input_date ) = date_trunc('week',current_date) - interval '1 week' as is_previous_weekupdate public.date set is_previous_week = date_trunc('week',time_date ) = date_trunc('week',current_date) - interval '1 week';create index cal_is_previous_week on public.date (is_previous_week) where is_previous_week;,FALSE,FALSE
77
<<IsCurrentWeek>>Is Current WeekYYYis_current_weekbooleandate_trunc('week',input_date ) = date_trunc('week',current_date), is_current_week boolean,date_trunc('week',input_date ) = date_trunc('week',current_date) as is_current_weekupdate public.date set is_current_week = date_trunc('week',time_date ) = date_trunc('week',current_date);create index cal_is_current_week on public.date (is_current_week) where is_current_week;,FALSE,FALSE
78
<<IsFollowingWeek>>Is Following WeekYYYis_following_weekbooleandate_trunc('week',input_date ) = date_trunc('week',current_date) + interval '1 week', is_following_week boolean,date_trunc('week',input_date ) = date_trunc('week',current_date) + interval '1 week' as is_following_weekupdate public.date set is_following_week = date_trunc('week',time_date ) = date_trunc('week',current_date) + interval '1 week';create index cal_is_following_week on public.date (is_following_week) where is_following_week;,FALSE,FALSE
79
<<IsWeektoDate>>Is Week to DateYYYis_wtdbooleaninput_date between date_trunc('week',current_date) and current_date, is_wtd boolean,input_date between date_trunc('week',current_date) and current_date as is_wtdupdate public.date set is_wtd = time_date between date_trunc('week',current_date) and current_date;create index cal_is_wtd on public.date (is_wtd) where is_wtd;,FALSE,FALSE
80
<<IsBeginningofWeek>>Is Beginning of WeekYYYis_bowbooleanextract(isodow from input_date) = 1, is_bow boolean,extract(isodow from input_date) = 1 as is_bowupdate public.date set is_bow = extract(isodow from time_date) = 1;create index cal_is_bow on public.date (is_bow) where is_bow;,FALSE,FALSE
81
<<IsEndofWeek>>Is End of WeekYYYis_eowbooleanextract(isodow from input_date) = 7, is_eow boolean,extract(isodow from input_date) = 7 as is_eowupdate public.date set is_eow = extract(isodow from time_date) = 7;create index cal_is_eow on public.date (is_eow) where is_eow;,FALSE,FALSE
82
<<IsPastWeek>>Is Past WeekYYis_past_weekbooleaninput_date < date_trunc('week', current_date), is_past_week boolean,input_date < date_trunc('week', current_date) as is_past_weekcreate index cal_is_past_week on public.date (is_past_week) where is_past_week;,FALSE,FALSE
83
<<BeginningofWeek>>Beginning of WeekYbowdatedate_trunc('week',input_date)::date, bow date,date_trunc('week',input_date)::date as bow,'1900-01-01','1900-01-01'
84
<<EndofWeek>>End of WeekYeowdate(date_trunc('week',input_date) + interval '1 week' - interval '1 day')::date, eow date,(date_trunc('week',input_date) + interval '1 week' - interval '1 day')::date as eow,'1900-01-01','1900-01-01'
85
<<WeekNumber>>Week NumberYweek_numbersmallintextract(week from input_date)::smallint, week_number smallint,extract(week from input_date)::smallint as week_number,-1,-1
86
<<WeekNameLong>>Week Name LongYweek_name_longvarchar'Week ' || extract(week from input_date), week_name_long varchar,'Week ' || extract(week from input_date) as week_name_long,'Unknown','Undefined'
87
<<WeekNameShort>>Week Name ShortYweek_name_shortvarchar'W ' || extract(week from input_date), week_name_short varchar,'W ' || extract(week from input_date) as week_name_short,'Unknown','Undefined'
88
<<WeekofMonth>>Week of MonthYwomsmallintto_char(input_date,'w')::smallint, wom smallint,to_char(input_date,'w')::smallint as wom,-1,-1
89
<<IsPreviousQuarter>>Is Previous QuarterYYYis_previous_quarterbooleandate_trunc('quarter',input_date ) = date_trunc('quarter',current_date) - interval '3 months', is_previous_quarter boolean,date_trunc('quarter',input_date ) = date_trunc('quarter',current_date) - interval '3 months' as is_previous_quarterupdate public.date set is_previous_quarter = date_trunc('quarter',time_date ) = date_trunc('quarter',current_date) - interval '3 months';create index cal_is_previous_quarter on public.date (is_previous_quarter) where is_previous_quarter;,FALSE,FALSE
90
<<IsCurrentQuarter>>Is Current QuarterYYYis_current_quarterbooleandate_trunc('quarter',input_date ) = date_trunc('quarter',current_date), is_current_quarter boolean,date_trunc('quarter',input_date ) = date_trunc('quarter',current_date) as is_current_quarterupdate public.date set is_current_quarter = date_trunc('quarter',time_date ) = date_trunc('quarter',current_date);create index cal_is_current_quarter on public.date (is_current_quarter) where is_current_quarter;,FALSE,FALSE
91
<<IsFollowingQuarter>>Is Following QuarterYYYis_following_quarterbooleandate_trunc('quarter',input_date ) = date_trunc('quarter',current_date) + interval '3 months', is_following_quarter boolean,date_trunc('quarter',input_date ) = date_trunc('quarter',current_date) + interval '3 months' as is_following_quarterupdate public.date set is_following_quarter = date_trunc('quarter',time_date ) = date_trunc('quarter',current_date) + interval '3 months';create index cal_is_following_quarter on public.date (is_following_quarter) where is_following_quarter;,FALSE,FALSE
92
<<IsQuartertoDate>>Is Quarter to DateYYYis_qtdbooleaninput_date between date_trunc('quarter',current_date) and current_date, is_qtd boolean,input_date between date_trunc('quarter',current_date) and current_date as is_qtdupdate public.date set is_qtd = time_date between date_trunc('quarter',current_date) and current_date;create index cal_is_qtd on public.date (is_qtd) where is_qtd;,FALSE,FALSE
93
<<IsBeginningofQuarter>>Is Beginning of QuarterYYYis_boqbooleandate_trunc('quarter', input_date)::date <> date_trunc('quarter', input_date)::date -1, is_boq boolean,date_trunc('quarter', input_date)::date <> date_trunc('quarter', input_date)::date -1 as is_boqupdate public.date set is_boq = date_trunc('quarter', time_date)::date <> date_trunc('quarter', time_date)::date -1;create index cal_is_boq on public.date (is_boq) where is_boq;,FALSE,FALSE
94
<<IsEndofQuarter>>Is End of QuarterYYYis_eoqbooleandate_trunc('quarter', input_date)::date <> date_trunc('quarter', input_date)::date +1, is_eoq boolean,date_trunc('quarter', input_date)::date <> date_trunc('quarter', input_date)::date +1 as is_eoqupdate public.date set is_eoq = date_trunc('quarter', time_date)::date <> date_trunc('quarter', time_date)::date +1;create index cal_is_eoq on public.date (is_eoq) where is_eoq;,FALSE,FALSE
95
<<IsPastQuarter>>Is Past QuarterYYis_past_quarterbooleaninput_date < date_trunc('quarter', current_date), is_past_quarter boolean,input_date < date_trunc('quarter', current_date) as is_past_quartercreate index cal_is_past_quarter on public.date (is_past_quarter) where is_past_quarter;,FALSE,FALSE
96
<<BeginningofQuarter>>Beginning of QuarterYboqdatedate_trunc('quarter',input_date)::date, boq date,date_trunc('quarter',input_date)::date as boq,'1900-01-01','1900-01-01'
97
<<EndofQuarter>>End of QuarterYeoqdate(date_trunc('quarter',input_date) + interval '3 months' - interval '1 day')::date, eoq date,(date_trunc('quarter',input_date) + interval '3 months' - interval '1 day')::date as eoq,'1900-01-01','1900-01-01'
98
<<QuarterNumber>>Quarter NumberYquarter_numbersmallintextract(quarter from input_date)::smallint, quarter_number smallint,extract(quarter from input_date)::smallint as quarter_number,-1,-1
99
<<QuarterNameLong>>Quarter Name LongYquarter_name_longvarcharcase extract(quarter from input_date) when 1 then '1st quarter' when 2 then '2nd quarter' when 3 then '3rd quarter' when 4 then '4th quarter' end, quarter_name_long varchar,case extract(quarter from input_date) when 1 then '1st quarter' when 2 then '2nd quarter' when 3 then '3rd quarter' when 4 then '4th quarter' end as quarter_name_long,'Unknown','Undefined'
100
<<QuarterNameLongLoc>>Quarter Name Long CSYquarter_name_long_csvarcharcase extract(quarter from input_date) when 1 then '1. čtvrtletí' when 2 then '2. čtvrtletí' when 3 then '3. čtvrtletí' when 4 then '4. čtvrletí' end, quarter_name_long_cs varchar,case extract(quarter from input_date) when 1 then '1. čtvrtletí' when 2 then '2. čtvrtletí' when 3 then '3. čtvrtletí' when 4 then '4. čtvrletí' end as quarter_name_long_cs,'Neznámé','Nedefinované'
Loading...
 
 
 
Date Dimension
Month Dimension
Time Dimension
Locale
Time Ranges
Holidays
Special Rows
Sys
About