I am struggling with a query in SQL Server 2005-2008
There are 15 participants in a tournament. Every day, 7 random participants are chosen. Out of the 7, one is the teamleader.
The condition is that if a person has become a teamleader once, he cannot become again till all the others (rest 14) have got their chances.
How can i write a query to list these participants, day wise for an entire month except sunday
Here's the way the output expected (assuming TL is the TeamLeader and P1, P2..participants)
TL P1 P2 P3 P4 P5 P6
Jun 23 -
Jun 24 -
Jun 25 -
Jun 26 -
Jun 28 -
Jun 29 -
and so on...