Tag: 1148. Article Views
-
Leetcode SQL: 1148. Article Views
•
1148. Article Views I Corrected SQL Code: SELECT DISTINCT [author_id] AS id FROM Views WITH (NOLOCK) WHERE author_id = viewer_id ORDER BY [author_id]; Explanation: SELECT DISTINCT [author_id] AS id: We are selecting the author_id column from the Views table, but we are using the DISTINCT keyword to ensure that only…