FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
LeetCode-Solutions/MySQL/reported-posts-ii.sql at master · deepbas/LeetCode-Solutions · GitHub
deepbas
/
LeetCode-Solutions
Public
forked from
kamyu104/LeetCode-Solutions
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
LeetCode-Solutions
/
MySQL
/
reported-posts-ii.sql
Copy path
More file actions
More file actions
Latest commit
History
History
History
12 lines (11 loc) · 350 Bytes
Breadcrumbs
LeetCode-Solutions
/
MySQL
/
reported-posts-ii.sql
Copy path
File metadata and controls
12 lines (11 loc) · 350 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
#
Time: O(m + n)
#
Space: O(n)
SELECT
ROUND(
AVG
(removal_percent),
2
) average_daily_percent
FROM
(
SELECT
a
.
action_date
,
COUNT
(DISTINCT
r
.
post_id
)
/
COUNT
(DISTINCT
a
.
post_id
)
*
100
removal_percent
FROM
Actions a
LEFT JOIN
Removals r
ON
a
.
post_id
=
r
.
post_id
WHERE
a
.
extra
=
'
spam
'
GROUP BY
a
.
action_date
ORDER BY
NULL
) tmp
Back
|
FazBrowse Home
|
New Git URL