I have a huge database 'Job seeker' having multiple table like username, skills, qualification, job, social media, etc. One user can have multiple columns on job, social media, etc. table. Now if I use simple inner join I get multiple columns for single user.
Select user.user_id, user.name, s.skill_name, s.type , q.qualification, j.job_name, s_url
from username user
inner join skills s on s.skill_user = user.user_id
inner join qualification q on q.qualification_user = user.user_id
inner join job j on j.job_user = user.user_id
But what if I want top 1 row for each user. How can I do it?
Edit: Is there some other way to do this instead of using distinct?