SQL · Amazon · Medium
Given two tables in a music streaming application, identify pairs of users who should be suggested as new connections because they share strong overlapping listening behavior. The table listens tracks each song play by a user: user_id BIGINT song_id BIGINT listened_at TIMESTAMP The table friendships stores existing undirected friendships. Each row contains two user IDs and when the friendship was created: user_id_1 BIGINT user_id_2 BIGINT created_at TIMESTAMP Two users are…
Checking your access…