4 Replies Latest reply on Jul 3, 2018 7:03 AM by Jose Garza

    Check when a customer makes first order

    Jose Garza

      Hello everyone,

       

      I have linked to a PostgreSQL data source with several tables. One of the tables has the following information:

       

      UserIDCreatedAt
      1Feb/01/2018
      2Feb/20/2018
      3March/12/2018
      4April/29/2018
      5June/2/2018

       

      This table shows when a user created an account on a website.

       

      Another table contains information of when a specific user placed an order

       

      OrderIDUserIDOrderDate
      A1Feb/27/2018
      B2March/3/2018
      C3April/20/2018
      D1June/14/2018
      E4May/1/2018
      F3May/16/2018

       

      I want to show a weekly chart of when a new customer placed his first order, so for example it would show that on Feb/27/2018 UserID 1 placed his first order but I do not want it to show again on June/14/2018.

       

      Should I be using the min function? Or can this be done by joining the tables in a specific way?