select TIMESTAMPADD(SQL_TSI_DAY, -30, @{V_date}{date'2013-12-05'}) FROM "A1 Bc Analysis" where "D00 Day More"."Date2" = @{V_yesterday}{date'2013-12-05'}
select TIMESTAMPADD(SQL_TSI_DAY, -30, @{V_date}{date'2013-12-05'}) FROM "A1 Bc Analysis"
SELECT TIMESTAMPADD(SQL_TSI_DAY, -30, "D00 Day"."Date") FROM "A1 Bc Analysis" where "D00 Day More"."Date2" = @{V_date}{date'2013-12-10'}
(case when '@{V_peroid}{onemonth}'='onemonth' then TIMESTAMPADD(SQL_TSI_DAY, -30, @{V_date}{date'2013-12-01'})
when '@{V_peroid}{onemonth}'='twomonth' then TIMESTAMPADD(SQL_TSI_DAY, -60, @{V_date}{date'2013-12-01'}) else TIMESTAMPADD(SQL_TSI_DAY, -10, @{V_date}
{date'2013-12-01'}) end)
"D00 Day"."Date" < @{V_date}{date'2013-12-01'} and "D00 Day"."Date" > TIMESTAMPADD(SQL_TSI_DAY, -30, @{V_date}{date'2013-12-01'})
SELECT TIMESTAMPADD(SQL_TSI_DAY, -30, "D00 Day"."Date") FROM "A1 Bc Analysis" where "D00 Day More"."Date2" = @{V_date}{date'2013-12-10'}
SELECT TIMESTAMPADD(SQL_TSI_DAY, 0, "D00 Day"."Date") FROM "A1 Bc Analysis" where "D00 Day More"."Date2" = @{V_yesterday}{date'2013-12-05'}
Prom Week Peroid
[email protected]
[email protected]
[email protected]
[email protected]
One Month
Two Month
Three Month
Six Month
Year
"D00 Day"."Date" < @{V_date}{date'2013-12-01'} and "D00 Day"."Date" >(
case when '@{V_peroid}{One Month}'='One Month' then TIMESTAMPADD(SQL_TSI_DAY, -30, @{V_date}{date'2013-12-01'})
when '@{V_peroid}{One Month}'='Two Month' then TIMESTAMPADD(SQL_TSI_DAY, -60, @{V_date}{date'2013-12-01'})
when '@{V_peroid}{One Month}'='Three Month' then TIMESTAMPADD(SQL_TSI_DAY, -60, @{V_date}{date'2013-12-01'})
when '@{V_peroid}{One Month}'='Six Month' then TIMESTAMPADD(SQL_TSI_DAY, -60, @{V_date}{date'2013-12-01'})
else TIMESTAMPADD(SQL_TSI_DAY, -5, @{V_date}{date'2013-12-01'}) end)
select "D03 Pn"."Pn" from "A1 Bc Analysis" where "D03 Pn"."Platform" = 'win' and "D03 Pn"."Insert From" in (select max("D03 Pn"."Insert From") from "A1 Bc
Analysis" where "D03 Pn"."Platform" = 'win')
Peroid
Week
Month
Three Month
Six Month
Year
1. 有哪些是目前質檢體系發現不了的問題(發生過,只是 是沒有事先察覺)
2. 哪些是管理層需要了解的但現有質檢體系滿足不了的
3. 現有的質檢體系介紹,哪些規
select * from (
select t.platform as platform,
t.version_id as version_id,
t.version as oversion,
regexp_substr(t.version, '^[[:digit:]\.]') as bigver,
decode(regexp_substr(version, '^[[:digit:]\.]'),4,regexp_substr(version, '^[[:digit:]](\.[[:digit:]]+)+00$'),version) as version
from dim_version t
where regexp_substr(t.version, '^[[:digit:]](\.[[:digit:]]+)+$') is not null
and t.version != 'all'
)
where version is not null
select platform,pn,regexp_substr(t.pn, '^[[:alnum:]](\_)*([[:alnum:]]+)+$') ,pn_id from dim_pn t
select platform,
pn,
pn_id
from dim_pn t
where regexp_substr(t.pn, '^[:alnum:]*_*[[:alnum:]]*$') is not null and t.pn !='all'
select
distinct platform,regexp_extract(version,'^([1-4])\.',1), version
from
rc_pt
where
1=1
and accessDay >= '20130704'
and accessDay <= '20130704'
and datatype='first'
and product='online'
and platform in('anphone','win','anpad','')
and length(deviceid)=40
and regexp_extract(version,'^[1-4](\.)',1) != '.'
and version not rlike '(^[1-3]\.[0-9]+(\.[0-9]+){0,2}$)|(^4\.[0-9]{1,2}\.[0-9]{1,3}\.[1-9]{1,2}0?00$)';
select
distinct platform,regexp_extract(version,'^([1-4])\.',1), version
from
rc_pt
where
1=1
and accessDay >= '20130704'
and accessDay <= '20130704'
and datatype='first'
and product='online'
and platform in('win','mac','iphone','ipad','anpad','anphone')
and regexp_extract(version,'^[1-4](\.)',1) = '.'
and version rlike '(^[1-3]\.[0-9]+(\.[0-9]+){0,2}$)|(^4\.[0-9]{1,2}\.[0-9]{1,3}(\.[1-9]{1,2}0?00)?$)';
and length(deviceid)=40;
select
distinct platform,regexp_extract(version,'^([1-4])\.',1), version
from
rc_pt
where
1=1
and accessDay >= '20130704'
and accessDay <= '20130704'
and datatype='first'
and product='online'
and platform in('win','mac','iphone','ipad','anpad','anphone')
and version rlike '(^4\.[0-9]{1,2}\.[0-9]{1,2})|(^4\.[0-9]{1,2}\.[0-9]{1,2}\.[1-9]0?00$)'
and length(deviceid)=40;
select
distinct platform,regexp_extract(version,'^([1-4])\.',1), version
from
rc_pt
where
1=1
and accessDay >= '20130704'
and accessDay <= '20130704'
and datatype='first'
and product='online'
and platform in('win','mac','iphone','ipad','anpad','anphone')
and version REGEXP '^4(\.[0-9]{1,2}){1,2}(\.[1-9]{1,2}0?00$)?'
and length(deviceid)=40;
(^[1-3]\.[0-9]+(\.[0-9]+){0,2}$)|(^4\.[0-9]{1,2}\.[0-9]{1,3}(\.[1-9]{1,2}0?00$)?)
select
distinct platform,regexp_extract(version,'^([1-4])\.',1), version
from
rc_pt
where
1=1
and accessDay >= '20130704'
and accessDay <= '20130704'
and datatype='first'
and product='online'
and platform in('anphone')
and length(deviceid)=40
and version rlike '^[1-3](\.[0-9]+)+$';
(?(exp)yes|no)
^[1-9a-z]*_*[1-9a-z]*$
select
distinct platform,(case when platform='anphone' and (substr(pn,1,1)='1' or substr(pn,1,1)='2') then 'user-defined' else pn end) as pn
from
rc_pt
where
1=1
and accessDay >= '20130704'
and accessDay <= '20130704'
and datatype='oc'
and product='online'
and platform in('win','mac','iphone','ipad','anpad','anphone')
and length(deviceid)=40
and pn rlike '^[a-zA-Z0-9_]+$';
常用到的一些SQL
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
BIAPPS遷移
lzflydream
2020-06-16 15:48:22
OBIEE 10g & OBIEE 11g中的fmap
小尹
2020-02-25 07:57:59
Access denied for user to path /users/weblogic
小尹
2020-02-25 07:57:59
Oracle BIEE 調整最大下載行數
小尹
2020-02-25 07:57:59
Oracle UPK
lzflydream
2020-02-22 12:08:16
Oracle Data Integrator(ODI)
lzflydream
2020-02-22 12:08:16
BI開發流程和ETL介紹
lzflydream
2020-02-22 12:08:16
Oracle BIEE
lzflydream
2020-02-22 12:08:16
多維數據模型
gan690416372
2020-02-20 14:37:08
BIEE11的URL中去掉 analytics
zhzhiqun
2018-12-07 19:20:26
BIEE 實現指定時間往前推幾個月的選擇
zhzhiqun
2018-11-28 13:07:58
biee取兩個時間的日期天數
zhzhiqun
2018-11-26 04:15:20
關於BIEE傳參問題
zhzhiqun
2018-11-26 04:15:20
BIEE 用戶跟蹤配置具體流程步驟
KommyWang
2018-09-05 04:21:18
BIEE11g外部權限表控制用戶數據權限之事實表控制方式
KommyWang
2018-09-05 04:21:17