-
Notifications
You must be signed in to change notification settings - Fork 5
LeetCode Medium problam #28
Answered
by
iamAntimPal
IamShiwangi
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
Answered by
iamAntimPal
Mar 22, 2025
# Write your MySQL query statement below
WITH
T AS (
SELECT requester_id, accepter_id FROM RequestAccepted
UNION ALL
SELECT accepter_id, requester_id FROM RequestAccepted
)
SELECT requester_id AS id, COUNT(1) AS num
FROM T
GROUP BY 1
ORDER BY 2 DESC
LIMIT 1;
Replies: 2 comments
-
# Write your MySQL query statement below
WITH
T AS (
SELECT requester_id, accepter_id FROM RequestAccepted
UNION ALL
SELECT accepter_id, requester_id FROM RequestAccepted
)
SELECT requester_id AS id, COUNT(1) AS num
FROM T
GROUP BY 1
ORDER BY 2 DESC
LIMIT 1;
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
0 replies
Answer selected by
IamShiwangi
-
THANKYOU
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment