Query Activity - Day 1 focused Resource

Write a query activity to find weekdays, when subscribers likely opens email in last 30 days

SELECT
SubscriberKey,
CASE 
WHEN s.WEEKDAY=0 THEN 'MONDAY'
WHEN s.WEEKDAY=1 THEN 'TUSEDAY'
WHEN s.WEEKDAY=2 THEN 'WEDNESDAY'
WHEN s.WEEKDAY=3 THEN 'THURSDAY'
WHEN s.WEEKDAY=4 THEN 'FRIDAY'
WHEN s.WEEKDAY=5 THEN 'SATURDAY'
WHEN s.WEEKDAY=6 THEN 'SUNDAY'
END
AS LIKELYOPENSON
FROM
(SELECT MAX(DATEPART(WEEKDAY, EventDate)) AS WEEKDAY,SubscriberKey from _Open
WHERE EventDate >= DATEADD(day, -30, GETDATE())
group by SubscriberKey) s
WHERE SubscriberKey IN (SELECT SubscriberKey FROM MasterDE)         

Write a query activity to find how many emails were send per second for JobID=1234

select
? ? ? ?count(SubscriberKey)
? ? ? ?,convert(varchar, EventDate, 20) as EventDate
? ? ? ?,JobID
from _sent
where JobID=1234 
group by EventDate,JobID        

Write a query activity to find all the activities associated with Journey ='Journey1'


Select 
? ActivityName
, ActivityID
, JourneyActivityObjectID
, ActivityType
, ActivityExternalKey, 
_JourneyActivity.VersionID
,JourneyName
from _JourneyActivity inner join _Journey on
_JourneyActivity.VersionID=_Journey.VersionID
where JourneyName='Journey 1' 
          

要查看或添加评论,请登录

Shashi Prasad的更多文章

  • SSJS: Day 25 focused on Resource

    SSJS: Day 25 focused on Resource

    Write an SSJS block to Opt-Out from a specific Keyword from Mobile Connect Subscription

  • SSJS: Day 24 focused on Resource

    SSJS: Day 24 focused on Resource

    Write an SSJS block to Re-Opt-Infrom a specific Keyword from the Mobile Connect Subscription

  • SSJS: Day 23 focused on Resource

    SSJS: Day 23 focused on Resource

    Write an SSJS block to fetch customerkey for Publication List

  • SSJS: Day 22 focused on Resource

    SSJS: Day 22 focused on Resource

    Write an SSJS block to Upsert Subscribers to Publication List SSJS Code Snippets

    1 条评论
  • Query Activity - Day 12 focused Resource

    Query Activity - Day 12 focused Resource

    Extract distinct email domains from Contact Object for IP warm-up planning. SELECT DISTINCT REVERSE…

  • Query Activity - Day 11 focused Resource

    Query Activity - Day 11 focused Resource

    Could you write a query to fetch all the subscribers whose birthday is after 15 or 30 days? Use case: Send a birthday…

  • SSJS: Day 21 focused on Resource

    SSJS: Day 21 focused on Resource

    Write SSJS Code with Try-Catch-Throw and Handle Exception ? ? Platform.Load(core, 1);…

    5 条评论
  • SSJS: Day 20 focused on Resource

    SSJS: Day 20 focused on Resource

    Write an SSJS for Building Campaign-Specific Folder Structure in Marketing Cloud. https://www.

  • SSJS: Day 19 focused on Resource

    SSJS: Day 19 focused on Resource

    Who said we dont have UI for Transactional API? Not for Newbies Write SSJS to Create and Get List of Transactional APIs…

  • SSJS: Day 18 focused on Resource

    SSJS: Day 18 focused on Resource

    Write an SSJS script to create a folder under the data extension assets category. Leverage SimpleOperators to build a…

    4 条评论

社区洞察

其他会员也浏览了