Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e9f700b

Browse files
Update 40-01321-restaurant-growth.sql
1 parent ed9cdb4 commit e9f700b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎40-01321-restaurant-growth.sql‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
-- get sender and accepter in 1 column using UNION ALL
2+
-- count id, output the one with max counts
13

4+
select requester_id as id, count(*) as num
5+
from(
6+
select requester_id
7+
from RequestAccepted
8+
union all
9+
select accepter_id
10+
from RequestAccepted
11+
) temp1
12+
group by 1
13+
order by 2 desc
14+
limit 1
15+
16+
-- amazon- 2
17+
-- facebook- 1

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /