viewer_id
and view_date
.article_id
for each group.HAVING
clause to filter groups where the count of distinct articles is greater than one.viewer_id
from the filtered results as the final output.viewer_id
in ascending order.erDiagram Views { int article_id int author_id int viewer_id date view_date }