logo

Back to questions

LinkedIn Power Creators (Part 2)

Medium

The LinkedIn Creator team is looking for power creators who use their personal profile as a company or influencer page. If someone's LinkedIn page has more followers than the company they work for, we can safely assume that person is a power creator.

Write a query to return the IDs of these LinkedIn power creators in alphabetical order.

Assumption:

  • A person can work at multiple companies.

This is the second part of the question, so make sure your start with Part 1 if you haven't completed that yet!

Table:

Column NameType
profile_idinteger
namestring
followersinteger

Example Input:

profile_idnamefollowers
1Nick Singh92,000
2Zach Wilson199,000
3Daliana Liu171,000
4Ravit Jain107,000
5Vin Vashishta139,000
6Susan Wojcicki39,000

Table:

Column NameType
personal_profile_idinteger
company_idinteger

Example Input:

personal_profile_idcompany_id
14
19
22
31
43
56
65

Table:

Column NameType
company_idinteger
namestring
followersinteger

Example Input:

company_idnamefollowers
1The Data Science Podcast8,000
2Airbnb700,000
3The Ravit Show6,000
4DataLemur200
5YouTube1,6000,000
6DataScience.Vin4,500
9Ace The Data Science Interview4479

Example Output:

profile_id
1
3
4
5

This output shows that profile IDs 1-5 are all power creators, meaning that they have more followers than their each of their company pages, whether they work for 1 company or 3.

PostgreSQL 14

Refer friends to get bonus content & cool prizes.