Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update sql solution to lc problem: No.1484 #1782

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,10 @@ Activities</code> 表:
SELECT
sell_date,
COUNT(DISTINCT product) AS num_sold,
GROUP_CONCAT(DISTINCT product
ORDER BY product ASC
SEPARATOR ',') AS products
FROM
Activities
GROUP_CONCAT(DISTINCT product) AS products
FROM Activities
GROUP BY sell_date
ORDER BY sell_date ASC;
ORDER BY sell_date;
```

<!-- tabs:end -->
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,10 @@ For 2020-06-02, the Sold item is (Mask), we just return it.
SELECT
sell_date,
COUNT(DISTINCT product) AS num_sold,
GROUP_CONCAT(DISTINCT product
ORDER BY product ASC
SEPARATOR ',') AS products
FROM
Activities
GROUP_CONCAT(DISTINCT product) AS products
FROM Activities
GROUP BY sell_date
ORDER BY sell_date ASC;
ORDER BY sell_date;
```

<!-- tabs:end -->
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
SELECT
SELECT
sell_date,
COUNT(DISTINCT product) AS num_sold,
GROUP_CONCAT(DISTINCT product
ORDER BY product ASC
SEPARATOR ',') AS products
ORDER BY product) AS products
FROM
Activities
GROUP BY sell_date
ORDER BY sell_date ASC;
ORDER BY sell_date;