bugfree Icon
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course

Leetcode Problem 1148. Article Views I

1148. Article Views I

Leetcode Solutions

Finding Authors Who Viewed Their Own Articles

  1. Filter the Views table to find rows where author_id equals viewer_id.
  2. Select the distinct author_ids from the filtered result to ensure each author is listed only once.
  3. Sort the list of unique author IDs in ascending order.
  4. Return the sorted list of author IDs.

erDiagram
    Views {
        int article_id
        int author_id
        int viewer_id
        date view_date
    }

Ask Question

Programming Language
image/screenshot of info(optional)
Full Screen
Loading...

Suggested Answer

Answer
Full Screen
Copy Answer Code
Loading...