Skip to content

Commit b88b4e0

Browse files
authored
feat: update sql solution to lc problem: No.1484 (#1782)
1 parent 4769d32 commit b88b4e0

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

solution/1400-1499/1484.Group Sold Products By The Date/README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,10 @@ Activities</code> 表:
7070
SELECT
7171
sell_date,
7272
COUNT(DISTINCT product) AS num_sold,
73-
GROUP_CONCAT(DISTINCT product
74-
ORDER BY product ASC
75-
SEPARATOR ',') AS products
76-
FROM
77-
Activities
73+
GROUP_CONCAT(DISTINCT product) AS products
74+
FROM Activities
7875
GROUP BY sell_date
79-
ORDER BY sell_date ASC;
76+
ORDER BY sell_date;
8077
```
8178

8279
<!-- tabs:end -->

solution/1400-1499/1484.Group Sold Products By The Date/README_EN.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,10 @@ For 2020-06-02, the Sold item is (Mask), we just return it.
6868
SELECT
6969
sell_date,
7070
COUNT(DISTINCT product) AS num_sold,
71-
GROUP_CONCAT(DISTINCT product
72-
ORDER BY product ASC
73-
SEPARATOR ',') AS products
74-
FROM
75-
Activities
71+
GROUP_CONCAT(DISTINCT product) AS products
72+
FROM Activities
7673
GROUP BY sell_date
77-
ORDER BY sell_date ASC;
74+
ORDER BY sell_date;
7875
```
7976

8077
<!-- tabs:end -->
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
SELECT
1+
SELECT
22
sell_date,
33
COUNT(DISTINCT product) AS num_sold,
44
GROUP_CONCAT(DISTINCT product
5-
ORDER BY product ASC
6-
SEPARATOR ',') AS products
5+
ORDER BY product) AS products
76
FROM
87
Activities
98
GROUP BY sell_date
10-
ORDER BY sell_date ASC;
9+
ORDER BY sell_date;

0 commit comments

Comments
 (0)