leetcode

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 7191f9e7565c3a46f14b8e38532e06aa9f2c5230
parent 904487fcfb93aadae1c4f33e49a07fea22591582
Author: AndrewLockVI <andrewlaack1@gmail.com>
Date:   Mon, 26 Jun 2023 15:43:48 -0500

Completed article views i

Diffstat:
Aarticle-views-i/article-views-i.sql | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/article-views-i/article-views-i.sql b/article-views-i/article-views-i.sql @@ -0,0 +1,9 @@ +--Given a list of views for articles that contains +--both the viewer and the author return +--all unique authors who viewed their own articles +--in ascending order by id. + +SELECT DISTINCT Views.author_id AS id +FROM Views +WHERE Views.viewer_id = author_id +ORDER BY Views.author_id ASC