2.1.4 쿼리, 쿼리, 쿼리… 및 이탈 분석
목표
- 데이터 분석을 위한 쿼리 쓰기
- Adobe Experience Platform에서 사용할 수 있는 온라인, 콜 센터 및 충성도 데이터를 결합한 SQL 쿼리 작성
- Adobe 정의 함수에 대해 알아보기
컨텍스트
이 연습에서는 제품 보기, 제품 유입 경로, 이탈 등을 분석하는 쿼리를 작성합니다.
이 장에 나열된 모든 쿼리는 PSQL 명령줄 인터페이스 에서 실행됩니다. SQL 로 표시된 문 블록을 복사하고(CTRL-c) PSQL 명령줄 인터페이스 에 붙여 넣어야 합니다(CTRL-v). 쿼리 결과 블록은 붙여넣은 SQL 문과 연결된 쿼리 결과를 표시합니다.
데이터 분석을 위한 기본 쿼리 작성
타임스탬프
Adobe Experience Platform에서 캡처된 데이터는 타임스탬프가 지정됩니다. timestamp 특성을 사용하면 시간 경과에 따른 데이터를 분석할 수 있습니다.
하루에 몇 개의 제품 보기가 있습니까?
SQL
select date_format( timestamp , 'yyyy-MM-dd') AS Day,
count(*) AS productViews
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and eventType = 'commerce.productViews'
group by Day
limit 10;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
tech-insiders:all=> select date_format( timestamp , 'yyyy-MM-dd') AS Day,
count(*) AS productViews
from demo_system_event_dataset_for_website_global_v1_1
where _experienceplatform.demoEnvironment.brandName IN ('Citi Signal')
and eventType = 'commerce.productViews'
group by Day
limit 10;
Day | productViews
------------+--------------
2024-12-04 | 2297
(1 row)
상위 5개 제품 조회함
가장 많이 본 5개 제품은 무엇입니까?
SQL
select productListItems.name, count(*)
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and eventType = 'commerce.productViews'
group by productListItems.name
order by 2 desc
limit 5;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
tech-insiders:all=> select productListItems.name, count(*)
from demo_system_event_dataset_for_website_global_v1_1
where _experienceplatform.demoEnvironment.brandName IN ('Citi Signal')
and eventType = 'commerce.productViews'
group by productListItems.name
order by 2 desc
limit 5;
name | count(1)
-----------------------------------------+----------
{Google Pixel XL 32GB Black Smartphone} | 938
{SIM Only} | 482
{Samsung Galaxy S8} | 456
{Samsung Galaxy S7 32GB Black} | 421
(4 rows)
제품 상호 작용 단계, 보기에서 구매에 이르기까지
SQL
select eventType, count(*)
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and eventType is not null
and eventType <> ''
group by eventType;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
tech-insiders:all=> select eventType, count(*)
from demo_system_event_dataset_for_website_global_v1_1
where _experienceplatform.demoEnvironment.brandName IN ('Citi Signal')
and eventType is not null
and eventType <> ''
group by eventType;
eventType | count(1)
--------------------------+----------
commerce.productListAdds | 494
commerce.purchases | 246
commerce.productViews | 2297
(3 rows)
이탈 위험이 있는 방문자 식별(방문 페이지 => 서비스 취소)
SQL
select distinct --aepTenantId--.identification.core.ecid
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and web.webPageDetails.name = 'Cancel Service'
group by --aepTenantId--.identification.core.ecid
limit 10;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
tech-insiders:all=> select distinct _experienceplatform.identification.core.ecid
from demo_system_event_dataset_for_website_global_v1_1
where _experienceplatform.demoEnvironment.brandName IN ('Citi Signal')
and web.webPageDetails.name = 'Cancel Service'
group by _experienceplatform.identification.core.ecid
limit 10;
ecid
----------------------------------
86069928882940477620713284798772
75691756152042231410852704832434
47381264398548915586824480724480
51294194577949645447313762862726
95873885060131472480685538836534
71192995127345419624952514250737
81469709164961922907426138040032
53545252726821876244061095202780
13294750130353985087337266864522
58843891994459565443501421307174
(10 rows)
다음 쿼리 세트에서 "서비스 취소" 페이지를 방문한 고객 및 고객 행동에 대한 전체 보기를 얻기 위해 위의 쿼리를 확장합니다. Adobe 정의 함수 를 사용하여 정보를 세션화하고 이벤트의 시퀀스 및 타이밍을 식별하는 방법에 대해 알아봅니다. 또한 데이터 세트를 함께 결합하여 Microsoft Power BI에서 분석할 데이터를 더욱 풍부하고 준비합니다.
고급 쿼리
비즈니스 논리의 대부분은 고객을 위한 접점을 수집하고 시간별로 주문해야 합니다. 이 지원은 Spark SQL에서 창 함수 형태로 제공됩니다. 창 함수는 표준 SQL의 일부이며 다른 여러 SQL 엔진에서 지원됩니다.
Adobe 정의 함수
Adobe에서 경험 데이터를 더 잘 이해할 수 있도록 표준 SQL 구문에 Adobe 정의 함수 집합을 추가했습니다. 다음 두 개의 쿼리에서는 이러한 ADF 함수에 대해 알아봅니다. 설명서에서 자세한 정보와 전체 목록 을(를) 찾을 수 있습니다.
사람들이 세션에서 세 번째 페이지로 "서비스 취소" 페이지에 도달하기 전에 사이트에서 수행하는 작업은 무엇입니까?
이 쿼리를 사용하면 처음 두 개의 Adobe 정의 함수 SESS_TIMEOUT 및 NEXT 을(를) 발견하게 됩니다.
SESS_TIMEOUT() 은(는) Adobe Analytics에서 찾은 방문 그룹화를 재생합니다. 이는 유사한 시간 기반 그룹화를 수행하지만 사용자 정의 가능한 매개 변수를 제공합니다.
다음() 및 이전() 을 통해 고객이 사이트를 탐색하는 방법을 이해할 수 있습니다.
SQL
SELECT
webPage,
webPage_2,
webPage_3,
webPage_4,
count(*) journeys
FROM
(
SELECT
webPage,
NEXT(webPage, 1, true)
OVER(PARTITION BY ecid, session.num
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING).value
AS webPage_2,
NEXT(webPage, 2, true)
OVER(PARTITION BY ecid, session.num
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING).value
AS webPage_3,
NEXT(webPage, 3, true)
OVER(PARTITION BY ecid, session.num
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING).value
AS webPage_4,
session.depth AS SessionPageDepth
FROM (
select a.--aepTenantId--.identification.core.ecid as ecid,
a.timestamp,
web.webPageDetails.name as webPage,
SESS_TIMEOUT(timestamp, 60 * 30)
OVER (PARTITION BY a.--aepTenantId--.identification.core.ecid
ORDER BY timestamp
ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
AS session
from demo_system_event_dataset_for_website_global_v1_1 a
where a.--aepTenantId--.identification.core.ecid in (
select b.--aepTenantId--.identification.core.ecid
from demo_system_event_dataset_for_website_global_v1_1 b
where b.--aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and b.web.webPageDetails.name = 'Cancel Service'
)
)
)
WHERE SessionPageDepth=1
and webpage_3 = 'Cancel Service'
GROUP BY webPage, webPage_2, webPage_3, webPage_4
ORDER BY journeys DESC
LIMIT 10;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
webPage | webPage_2 | webPage_3 | webPage_4 | journeys
---------------------------------------+---------------------------------------+----------------+------------+----------
Telco Home | Citi Signal Sport | Cancel Service | Call Start | 2
Citi Signal Sport | Google Pixel XL 32GB Black Smartphone | Cancel Service | Call Start | 2
Broadband Deals | Samsung Galaxy S7 32GB Black | Cancel Service | | 2
TV & Broadband Deals | Samsung Galaxy S7 32GB Black | Cancel Service | | 2
SIM Only | Citi Signal Shop | Cancel Service | | 2
Google Pixel XL 32GB Black Smartphone | Broadband Deals | Cancel Service | | 2
SIM Only | Telco Home | Cancel Service | | 2
Citi Signal Shop | Samsung Galaxy S7 32GB Black | Cancel Service | Call Start | 1
Google Pixel XL 32GB Black Smartphone | Citi Signal Sport | Cancel Service | Call Start | 1
Google Pixel XL 32GB Black Smartphone | Citi Signal Shop | Cancel Service | Call Start | 1
(10 rows)
방문자가 "서비스 취소" 페이지를 방문한 후 콜센터에 문의 전화를 하기까지 시간이 얼마나 됩니까?
이러한 종류의 쿼리에 응답하려면 TIME_BETWEEN_NEXT_MATCH() Adobe 정의 함수를 사용합니다.
이전 또는 다음 일치 함수 사이의 시간 기능은 특정 인시던트 이후 경과된 시간을 측정하는 새 차원을 제공합니다.
SQL
select * from (
select --aepTenantId--.identification.core.ecid as ecid,
web.webPageDetails.name as webPage,
TIME_BETWEEN_NEXT_MATCH(timestamp, web.webPageDetails.name='Call Start', 'seconds')
OVER(PARTITION BY --aepTenantId--.identification.core.ecid
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
AS contact_callcenter_after_seconds
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and web.webPageDetails.name in ('Cancel Service', 'Call Start')
) r
where r.webPage = 'Cancel Service'
limit 15;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
ecid | webPage | contact_callcenter_after_seconds
----------------------------------+----------------+----------------------------------
00331886620679939148047665693117 | Cancel Service |
00626561600197295782131349716866 | Cancel Service |
00630470663554417679969244202779 | Cancel Service | -797
00720875344152796154458668700428 | Cancel Service | -519
00746064605049656090779523644276 | Cancel Service | -62
00762093837616944422322357210965 | Cancel Service |
00767875779073091876070699689209 | Cancel Service |
00798691264980137616449378075855 | Cancel Service |
00869613691740150556826953447162 | Cancel Service | -129
00943638725078228957873279219207 | Cancel Service | -750
01167540466536077846425644389346 | Cancel Service |
01412448537869549016063764484810 | Cancel Service |
01419076946514450291741574452702 | Cancel Service | -482
01533124771963987423015507880755 | Cancel Service |
01710651086750904478559809475925 | Cancel Service |
(15 rows)
그리고 그 접촉의 결과는 무엇입니까?
이 쿼리에서는 데이터 세트를 함께 결합하게 됩니다. 이 경우 데이터 집합 demo_system_event_dataset_for_website_global_v1_1
을(를) 데이터 집합 demo_system_event_dataset_for_call_center_global_v1_1
과(와) 연결합니다. 이는 콜센터 상호 작용의 결과를 이해하기 위해 수행됩니다.
SQL
select distinct r.*,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callFeeling,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callContractCancelled
from (
select --aepTenantId--.identification.core.ecid ecid,
web.webPageDetails.name as webPage,
TIME_BETWEEN_NEXT_MATCH(timestamp, web.webPageDetails.name='Call Start', 'seconds')
OVER(PARTITION BY --aepTenantId--.identification.core.ecid
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
AS contact_callcenter_after_seconds
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and web.webPageDetails.name in ('Cancel Service', 'Call Start')
) r
, demo_system_event_dataset_for_call_center_global_v1_1 c
where r.ecid = c.--aepTenantId--.identification.core.ecid
and r.webPage = 'Cancel Service'
and c.--aepTenantId--.interactionDetails.core.callCenterAgent.callContractCancelled IN (true,false)
and c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic IN ('contract', 'invoice','complaint','wifi')
limit 15;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
ecid | webPage | contact_callcenter_after_seconds | callfeeling | calltopic | callcontractcancelled
----------------------------------+----------------+----------------------------------+-------------+-----------+-----------------------
00630470663554417679969244202779 | Cancel Service | -797 | negative | contract | f
00720875344152796154458668700428 | Cancel Service | -519 | positive | contract | f
00746064605049656090779523644276 | Cancel Service | -62 | positive | contract | t
00869613691740150556826953447162 | Cancel Service | -129 | negative | contract | t
00943638725078228957873279219207 | Cancel Service | -750 | positive | contract | f
01419076946514450291741574452702 | Cancel Service | -482 | neutral | contract | f
01738842540109643781526526573341 | Cancel Service | -562 | neutral | contract | f
02052460258994877317679083617975 | Cancel Service | -545 | neutral | contract | f
02156496759733199802585567179589 | Cancel Service | -83 | neutral | contract | t
02666934104296797891818818456669 | Cancel Service | -297 | positive | contract | t
03059764265715537001416957172652 | Cancel Service | -243 | negative | contract | t
03347899869945278660479273416679 | Cancel Service | -229 | positive | contract | t
04258863338643046907489131372300 | Cancel Service | -588 | positive | contract | f
04733864373954008966920919247566 | Cancel Service | -795 | neutral | contract | f
05199871096822598772351169572451 | Cancel Service | -236 | positive | contract | t
(15 rows)
이러한 고객의 충성도 프로필은 무엇입니까?
이 쿼리에서는 Adobe Experience Platform에 온보딩된 CRM 데이터를 조인합니다. 이를 통해 CRM 데이터로 이탈 분석을 강화할 수 있습니다.
SQL
select r.*,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callFeeling,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic,
l.--aepTenantId--.loyaltyDetails.level,
l.--aepTenantId--.identification.core.crmId
from (
select --aepTenantId--.identification.core.ecid ecid,
web.webPageDetails.name as webPage,
TIME_BETWEEN_NEXT_MATCH(timestamp, web.webPageDetails.name='Call Start', 'seconds')
OVER(PARTITION BY --aepTenantId--.identification.core.ecid
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
AS contact_callcenter_after_seconds
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and web.webPageDetails.name in ('Cancel Service', 'Call Start')
) r
, demo_system_event_dataset_for_call_center_global_v1_1 c
, demo_system_profile_dataset_for_crm_global_v1_1 l
where r.ecid = c.--aepTenantId--.identification.core.ecid
and r.webPage = 'Cancel Service'
and l.--aepTenantId--.identification.core.ecid = r.ecid
and c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic IN ('contract', 'invoice','complaint','wifi','promo')
limit 15;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
ecid | webPage | contact_callcenter_after_seconds | callfeeling | calltopic | level | crmid
----------------------------------+----------------+----------------------------------+-------------+-----------+--------+-----------
00630470663554417679969244202779 | Cancel Service | -797 | negative | contract | Bronze | 524483285
00720875344152796154458668700428 | Cancel Service | -519 | positive | contract | Silver | 860696333
00746064605049656090779523644276 | Cancel Service | -62 | positive | contract | Bronze | 072387270
00869613691740150556826953447162 | Cancel Service | -129 | negative | contract | Bronze | 789347684
00943638725078228957873279219207 | Cancel Service | -750 | positive | contract | Gold | 033926162
01419076946514450291741574452702 | Cancel Service | -482 | neutral | contract | Bronze | 105063634
01738842540109643781526526573341 | Cancel Service | -562 | neutral | contract | Gold | 791324509
02052460258994877317679083617975 | Cancel Service | -545 | neutral | contract | Gold | 443477555
02156496759733199802585567179589 | Cancel Service | -83 | neutral | contract | Silver | 305085589
02666934104296797891818818456669 | Cancel Service | -297 | positive | contract | Silver | 104266570
03059764265715537001416957172652 | Cancel Service | -243 | negative | contract | Silver | 814175245
03347899869945278660479273416679 | Cancel Service | -229 | positive | contract | Gold | 377699708
04258863338643046907489131372300 | Cancel Service | -588 | positive | contract | Silver | 298321657
04733864373954008966920919247566 | Cancel Service | -795 | neutral | contract | Gold | 655070958
05199871096822598772351169572451 | Cancel Service | -236 | positive | contract | Gold | 425688874
(15 rows)
그들은 어느 지역에서 우리를 방문합니까?
고객 이탈에 대한 지리적 통찰력을 얻기 위해 Adobe Experience Platform이 캡처한 경도, 태도, 도시, 국가 코드와 같은 지리적 정보를 포함할 수 있습니다.
SQL
select distinct r.ecid,
r.city,
r.countrycode,
r.lat as latitude,
r.lon as longitude,
r.contact_callcenter_after_seconds as seconds_to_contact_callcenter,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callFeeling,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callContractCancelled,
l.--aepTenantId--.loyaltyDetails.level,
l.--aepTenantId--.identification.core.crmId
from (
select --aepTenantId--.identification.core.ecid ecid,
placeContext.geo._schema.latitude lat,
placeContext.geo._schema.longitude lon,
placeContext.geo.city,
placeContext.geo.countryCode,
web.webPageDetails.name as webPage,
TIME_BETWEEN_NEXT_MATCH(timestamp, web.webPageDetails.name='Call Start', 'seconds')
OVER(PARTITION BY --aepTenantId--.identification.core.ecid
ORDER BY timestamp
ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)
AS contact_callcenter_after_seconds
from demo_system_event_dataset_for_website_global_v1_1
where --aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and web.webPageDetails.name in ('Cancel Service', 'Call Start')
) r
, demo_system_event_dataset_for_call_center_global_v1_1 c
, demo_system_profile_dataset_for_crm_global_v1_1 l
where r.ecid = c.--aepTenantId--.identification.core.ecid
and r.webPage = 'Cancel Service'
and l.--aepTenantId--.identification.core.ecid = r.ecid
and c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic IN ('contract', 'invoice','complaint','wifi','promo')
limit 15;
위의 문을 복사하여 PSQL 명령줄 인터페이스 에서 실행하십시오.
쿼리 결과
ecid | city | countrycode | latitude | longitude | seconds_to_contact_callcenter | callfeeling | calltopic | callcontractcancelled | level | crmid
----------------------------------+------------+-------------+------------+------------+-------------------------------+-------------+-----------+-----------------------+--------+-----------
00630470663554417679969244202779 | Charlton | GB | 51.59119 | -1.407848 | -797 | negative | contract | f | Bronze | 524483285
00720875344152796154458668700428 | Ashley | GB | 51.4139633 | -2.2685462 | -519 | positive | contract | f | Silver | 860696333
00746064605049656090779523644276 | Liverpool | GB | 53.4913801 | -2.867264 | -62 | positive | contract | t | Bronze | 072387270
00869613691740150556826953447162 | Langley | GB | 51.888151 | -0.23924 | -129 | negative | contract | t | Bronze | 789347684
00943638725078228957873279219207 | Eaton | GB | 53.2945961 | -0.9335791 | -750 | positive | contract | f | Gold | 033926162
01419076946514450291741574452702 | Tullich | GB | 57.4694803 | -3.1269422 | -482 | neutral | contract | f | Bronze | 105063634
01738842540109643781526526573341 | Whitwell | GB | 54.3886617 | -1.555363 | -562 | neutral | contract | f | Gold | 791324509
02052460258994877317679083617975 | Edinburgh | GB | 55.9309486 | -3.1859102 | -545 | neutral | contract | f | Gold | 443477555
02156496759733199802585567179589 | West End | GB | 53.46464 | 0.04134 | -83 | neutral | contract | t | Silver | 305085589
02666934104296797891818818456669 | Newtown | GB | 51.3684218 | -1.3218754 | -297 | positive | contract | t | Silver | 104266570
03059764265715537001416957172652 | Edinburgh | GB | 55.9309486 | -3.1859102 | -243 | negative | contract | t | Silver | 814175245
03347899869945278660479273416679 | Liverpool | GB | 53.4913801 | -2.867264 | -229 | positive | contract | t | Gold | 377699708
04258863338643046907489131372300 | Norton | GB | 52.2679288 | -1.1202549 | -588 | positive | contract | f | Silver | 298321657
04733864373954008966920919247566 | Whitchurch | GB | 51.4057505 | -2.5573746 | -795 | neutral | contract | f | Gold | 655070958
05199871096822598772351169572451 | Stapleford | GB | 53.10672 | -0.687802 | -236 | positive | contract | t | Gold | 425688874
(15 rows)
콜센터 상호 작용 분석
위의 쿼리에서는 서비스 취소 시 콜센터에 연락하게 된 방문자에 대해서만 살펴보았습니다. 이를 좀 더 광범위하게 고려하고 (wifi, 프로모션, 청구서, 컴플레인 및 계약서)를 포함한 모든 콜센터 상호 작용을 고려하려고 합니다.
쿼리를 편집해야 하므로 먼저 메모장이나 대괄호를 열겠습니다.
Windows의 경우 Windows 도구 모음에서 "검색"-아이콘(1)을 클릭하고 "검색"-필드에 메모장 을 입력한 다음(2) "메모장" 결과를 클릭합니다(3).
Mac에서
다음 문을 메모장/대괄호로 복사합니다.
select /* enter your name */
e.--aepTenantId--.identification.core.ecid as ecid,
e.placeContext.geo.city as city,
e.placeContext.geo._schema.latitude latitude,
e.placeContext.geo._schema.longitude longitude,
e.placeContext.geo.countryCode as countrycode,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callFeeling as callFeeling,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callTopic as callTopic,
c.--aepTenantId--.interactionDetails.core.callCenterAgent.callContractCancelled as contractCancelled,
l.--aepTenantId--.loyaltyDetails.level as loyaltystatus,
l.--aepTenantId--.loyaltyDetails.points as loyaltypoints,
l.--aepTenantId--.identification.core.crmId as crmid
from demo_system_event_dataset_for_website_global_v1_1 e
,demo_system_event_dataset_for_call_center_global_v1_1 c
,demo_system_profile_dataset_for_crm_global_v1_1 l
where e.--aepTenantId--.demoEnvironment.brandName IN ('Citi Signal')
and e.web.webPageDetails.name in ('Cancel Service', 'Call Start')
and e.--aepTenantId--.identification.core.ecid = c.--aepTenantId--.identification.core.ecid
and l.--aepTenantId--.identification.core.ecid = e.--aepTenantId--.identification.core.ecid;
및 바꾸기
enter your name
/\*
및 \*/
을(를) 제거하지 마십시오. 메모장의 수정된 문장은 다음과 같아야 합니다.
수정된 문을 메모장 에서 PSQL 명령줄 창(으)로 복사하고 Enter 키를 누르십시오. PSQL 명령줄 창에 다음 결과가 표시됩니다.
tech-insiders:all=> select /* vangeluw */
e._experienceplatform.identification.core.ecid as ecid,
e.placeContext.geo.city as city,
e.placeContext.geo._schema.latitude latitude,
e.placeContext.geo._schema.longitude longitude,
e.placeContext.geo.countryCode as countrycode,
c._experienceplatform.interactionDetails.core.callCenterAgent.callFeeling as callFeeling,
c._experienceplatform.interactionDetails.core.callCenterAgent.callTopic as callTopic,
c._experienceplatform.interactionDetails.core.callCenterAgent.callContractCancelled as contractCancelled,
l._experienceplatform.loyaltyDetails.level as loyaltystatus,
l._experienceplatform.loyaltyDetails.points as loyaltypoints,
l._experienceplatform.identification.core.crmId as crmid
from demo_system_event_dataset_for_website_global_v1_1 e
,demo_system_event_dataset_for_call_center_global_v1_1 c
,demo_system_profile_dataset_for_crm_global_v1_1 l
where e._experienceplatform.demoEnvironment.brandName IN ('Citi Signal')
and e.web.webPageDetails.name in ('Cancel Service', 'Call Start')
and e._experienceplatform.identification.core.ecid = c._experienceplatform.identification.core.ecid
and l._experienceplatform.identification.core.ecid = e._experienceplatform.identification.core.ecid;
ecid | city | latitude | longitude | countrycode | callFeeling | callTopic | contractCancelled | loyaltystatus | loyaltypoints | crmid
----------------------------------+------------+------------+------------+-------------+-------------+-----------+-------------------+---------------+---------------+-----------
60082543727227001177187726544992 | Normanton | 52.643749 | -0.622129 | GB | neutral | contract | f | Bronze | 430.0 | 117969439
03250145103029549687906576330844 | Charlton | 51.59119 | -1.407848 | GB | none | none | f | Silver | 585.0 | 271570836
87322786414150971711720565798532 | Whitwell | 54.3886617 | -1.555363 | GB | none | none | f | Bronze | 872.0 | 570762160
46736059905281823751180777497223 | Edinburgh | 55.9309486 | -3.1859102 | GB | none | none | f | Gold | 482.0 | 980678773
81958524709959359235057647680790 | Linton | 54.0542238 | -2.0215836 | GB | none | none | f | Bronze | 666.0 | 341873673
24854602977644353049269284436324 | Tullich | 57.4694803 | -3.1269422 | GB | negative | contract | f | Bronze | 418.0 | 831581327
24854602977644353049269284436324 | Tullich | 57.4694803 | -3.1269422 | GB | negative | contract | f | Bronze | 418.0 | 831581327
다음에 Microsoft Power BI에서 사용할 새 데이터 세트로 쿼리(select로 테이블 만들기 또는 CTAS 라고도 함)를 유지합니다.