SQL Server - Select one random record not showing duplicates?

You could use a cross apply to retrieve one random photo per event: select * from Events cross apply ( select top 1 * from Photos where Photos. Event_Id = Events. Event_Id order by newid() ) RandomPhoto where Events.

Event_EndDate.

Look at this xaprb article. It shows several techniques you could use. It recommends a minimal-row and self-join approach.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions