This particular problem can be found on Leetcode SQL study plan
The link for the same is added here:-
https://leetcode.com/problems/article...
Link for the study plan:
https://leetcode.com/studyplan/top-sq...
In case you want to check the previous videos, you can check here:-
Day 3: • Day 3 | SQL interview Question | Leet...
Day 2: • Day 2 Mastering SQL Queries | LeetCod...
Day 1: • Day 1: Mastering SQL Queries | LeetCo...
SQL
LeetCode
SQL Tutorial
SQL Problem Solving
WHERE Clause
COALESCE Function
NOT IN Operator
Distinct
Order By
SQL Query Optimization
Database Management
Data Analysis
SQL Tips and Tricks
Programming Challenges
SQL Mastery
Technical Skills
Data Manipulation
#sql, #leetcode #sqlserver
#analytics #dataanalytics #technology
#coding #computerscience #datascience #data
#sqltutorial #sqlforbeginners
tags: SQL, MYSQL, T-SQL, SQL query, SQL tutorial, SQL for beginners, create table in SQL, SQL server, SQL database, datascience, data analytics, business analytics, Excel tips, SQL tips, SQL interview questions, SQL interview preparation, SQL hacks, Excel to SQL
Table: Views
+---------------+---------+
| Column Name | Type |
+---------------+---------+
| article_id | int |
| author_id | int |
| viewer_id | int |
| view_date | date |
+---------------+---------+
There is no primary key (column with unique values) for this table, the table may have duplicate rows.
Each row of this table indicates that some viewer viewed an article (written by some author) on some date.
Note that equal author_id and viewer_id indicate the same person.
Write a solution to find all the authors that viewed at least one of their own articles.
Return the result table sorted by id in ascending order.