I am sure this task can be accomplished with many variations.
I run a call center that services existing customers.
Each Agent that answers phone calls are identified by an Agent ID Number (AgentId).
Each customer must have (and is identified by) an account number (AcctNo).
If I had a table that contained records of every phone contact for every agent & customer it would look like this (assume both are int datatypes):
An agent can talk to any customer so AgentId appears numerous times more than once.
A customer can call at any time so AcctNo appears numerous times more than once.
If I had to write a query that would extract the first 5 records for each and every agent for a sampling (being random is not an issue); how would I do it?