2 Replies Latest reply on Dec 7, 2018 3:21 AM by Edward McKeown

    Count Distinct

    Edward McKeown

      I have a table two columns:

       

      user_id and visitor_id

       

      user_id is the customer's id if they have logged in, and visitor_id is an id that everyone that visits the site gets.

       

      so user_id will have some nulls.

       

      I wish to do a count distinct on user_id, and then if the user_id is null the count distinct on the visitor_id.

       

      Screen Shot 2018-12-06 at 22.39.45.png

       

      so I would like two bars next to each other: one for user_id and one for visitor_id.

       

      user_id = 5

      visitor = 3