1 Reply Latest reply on Jul 26, 2017 4:15 AM by Prayson Wilfred Daniel

    How to achieve this?

    Abhinav Srivastava

      In SQl, there are two statements:

       

      For daily active users:

       

      select count(distinct client_id) as dau,cast(event_timestamp as date) as date from know.vr2_event

      group by date

       

      For monthly active users:

       

      select count(distinct client_id) as mau,datepart(month,event_timestamp) as month,datepart(year,event_timestamp) as year from know.vr2_event

      group by month,year

       

      Now, I want to make a calculated field for these queries. How to do the same?

       

      I have date and client_id in my data.