logo

Back to questions

LinkedIn Power Creators (Part 1)

Easy

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 ordered by the IDs.

Assumption:

  • Each person with a LinkedIn profile in this database works at one company only.

Table:

Column NameType
profile_idinteger
namestring
followersinteger
employer_idinteger

Example Input:

profile_idnamefollowersemployer_id
1Nick Singh92,0004
2Zach Wilson199,0002
3Daliana Liu171,0001
4Ravit Jain107,0003
5Vin Vashishta139,0006
6Susan Wojcicki39,0005

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

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 company page.

PostgreSQL 14

Refer friends to get bonus content & cool prizes.