9 Replies Latest reply on Oct 10, 2016 1:45 PM by Abhinav Kumar

    Extracting common rows

    Abhinav Kumar

      Hi Guys,

       

      I have a doubt regarding dates. I have a sample data shown below:

          

      Customer NameEmailOrder DateVendor
      J Davej.dave@abc.com10/6/2016Amazon
      J Davej.dave@abc.com9/15/2016Amazon
      J Davej.dave@abc.com9/15/2016eBay
      XYZxyz@abc.com10/6/2016eBay
      J Davej.dave@abc.com10/6/2016Amazon
      J Davej.dave@abc.com8/3/2016REI
      XYZxyz@abc.com10/6/2016Walmart
      XYZxyz@abc.com10/6/2016Costco
      J Davej.dave@abc.com10/6/2016Amazon
      XYZxyz@abc.com9/15/2016Costco

      I need to find all those rows which have same Name and Email who ordered from let's say Amazon on a single date. For example, if I try to run a query the output should be:

          

      Customer NameEmailOrder DateVendor
      J Davej.dave@abc.com10/6/2016

      Amazon

      Amazon
      Amazon

      I tried combining Customer Name and email and then select count distinct of Order date and filtering amazon, but it doesn't help.

       

      Can someone please help me!

       

      Thanks,

      A