leetcode

Leetcode submissions
git clone git://git.laack.co/leetcode.git
Log | Files | Refs | README

group-sold-products-by-the-date.sql (286B)


      1 --Given a list of products return the number of
      2 --unique products sold on given days and return
      3 --a list of the distinct products as another
      4 --column.
      5 
      6 SELECT sell_date, COUNT(DISTINCT product) as num_sold, GROUP_CONCAT(DISTINCT product) as products
      7 FROM Activities
      8 GROUP BY sell_date
      9