Skip to content

Commit b2fa8a2

Browse files
committed
feat: add sql solution to lc problem: No.1113
No.1113: Reported Posts
1 parent 2246fd6 commit b2fa8a2

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

solution/1100-1199/1113.Reported Posts/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,18 @@ Result table:
6666
### **SQL**
6767

6868
```sql
69-
69+
# Write your MySQL query statement below
70+
SELECT
71+
extra report_reason,
72+
count(
73+
DISTINCT ( post_id )) report_count
74+
FROM
75+
Actions
76+
WHERE
77+
action_date = '2019-07-04'
78+
AND action = 'report'
79+
GROUP BY
80+
extra
7081
```
7182

7283
<!-- tabs:end -->

solution/1100-1199/1113.Reported Posts/README_EN.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,18 @@ Actions table:
7070
### **SQL**
7171

7272
```sql
73-
73+
# Write your MySQL query statement below
74+
SELECT
75+
extra report_reason,
76+
count(
77+
DISTINCT ( post_id )) report_count
78+
FROM
79+
Actions
80+
WHERE
81+
action_date = '2019-07-04'
82+
AND action = 'report'
83+
GROUP BY
84+
extra
7485
```
7586

7687
<!-- tabs:end -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Write your MySQL query statement below
2+
SELECT
3+
extra report_reason,
4+
count(
5+
DISTINCT ( post_id )) report_count
6+
FROM
7+
Actions
8+
WHERE
9+
action_date = '2019-07-04'
10+
AND action = 'report'
11+
GROUP BY
12+
extra

0 commit comments

Comments
 (0)