Most asked SQL Question with Answer | LinkedIn - Duplicate Job Listing

Опубликовано: 11 Март 2025
на канале: ETL SQL
206
2

Free SQL Pattern Training: https://etlsql.kartra.com/page/sps-fr...

Do you understand SQL but still cannot write SQL queries correctly ?
Are you afraid to switch jobs because of the SQL interview rounds or have you failed SQL Interview earlier ?
If you are someone who understands SQL and need more confidence to solve SQL queries correctly, I would like to share my recent online course especially created for you.
Check for more details: https://etlsql.kartra.com/page/sql-pa...

In this video I have solved SQL Question - Titled "Duplicate Job Listing" on Data Lemur platform.
Data Lemur referral link for easy reference: https://bit.ly/3SuF3wf

Hope you like the way I am explaining my thought process.
Let me know if this is helping you to solve SQL queries more confidently and you wish me to share more such videos.

Question:
Assume you are given the table below that shows job postings for all companies on the LinkedIn platform. Write a query to get the number of companies that have posted duplicate job listings.

Clarification:

Duplicate job listings refer to two jobs at the same company with the same title and description.

Solution:
#############################

SELECT count(*) as duplicate_companies
FROM
(
select company_id,title,description,count(*)
FROM
job_listings
group by company_id,title,description
having count(*) "greater than" 1
)t1;

#############################

Note : replace greater than with operator symbol