From ffb597268b79e4d2c2e1dd608b1f3e4bf94a0521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Chac=C3=B3n=20Guti=C3=A9rrez?= <138903866+joseantoniochacon@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:31:11 -0600 Subject: [PATCH] Time: 399 ms (80.37%), Space: 0B (100.00%) - LeetHub --- .../1484-group-sold-products-by-the-date.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 1484-group-sold-products-by-the-date/1484-group-sold-products-by-the-date.sql diff --git a/1484-group-sold-products-by-the-date/1484-group-sold-products-by-the-date.sql b/1484-group-sold-products-by-the-date/1484-group-sold-products-by-the-date.sql new file mode 100644 index 0000000..83f6ef0 --- /dev/null +++ b/1484-group-sold-products-by-the-date/1484-group-sold-products-by-the-date.sql @@ -0,0 +1,3 @@ +# Write your MySQL query statement below + +SELECT sell_date, COUNT(DISTINCT product) as num_sold, GROUP_CONCAT(DISTINCT product ORDER BY product SEPARATOR ',' ) AS products FROM Activities GROUP BY sell_date ORDER BY sell_date \ No newline at end of file