NewbieWithSQL
Programmer
I have seen a lot of posts about returning top 3 random records from the entire table but couldn't find one about random records for a specific reason.
I have a table that holds information on employees and the supervisor they are assigned to. I need to find a way of getting 3 or less random employees for each supervisor that exists in the table. Reason I say 3 or less is due to some supervisors may only have 1 or 2 employees assigned to them. Any help with either the code or a link that shows what I'm trying to accomplish is greatly appreciated. I can provide dummy data if needed.
Thanks in advance
I have a table that holds information on employees and the supervisor they are assigned to. I need to find a way of getting 3 or less random employees for each supervisor that exists in the table. Reason I say 3 or less is due to some supervisors may only have 1 or 2 employees assigned to them. Any help with either the code or a link that shows what I'm trying to accomplish is greatly appreciated. I can provide dummy data if needed.
Thanks in advance