LeetCode SQL Medium

Watch and track your favorite playlist.

Curated by: Everyday Data Science (140 videos)


Currently Playing: Leetcode MEDIUM 614 - Second Degree Follower JOIN Solution - Explained by Everyday Data Science

Question: https://leetcode.com/problems/second-degree-follower/description/ SQL Schema: Create table If Not Exists Follow (followee varchar(255), follower varchar(255)) Truncate table Follow insert into Follow (followee, follower) values ('Alice', 'Bob') insert into Follow (followee, follower) values ('Bob', 'Cena') insert into Follow (followee, follower) values ('Bob', 'Donald') insert into Follow (followee, follower) values ('Donald', 'Edward') Pandas Schema: data = [['Alice', 'Bob'], ['Bob', 'Cena'], ['Bob', 'Donald'], ['Donald', 'Edward']] follow = pd.DataFrame(data, columns=['followee', 'follower']).astype({'followee':'object', 'follower':'object'}) #datascience #mysqltutorials #leetcodesolutions


Tracks in this Playlist