is there a way to show a certain amount of random records from a database table, but heavily influenced by the date and time of creation.
for example:
- showing 10 records at random, but
showing latest with more frequency than the earliest
say there are 100 entries in the
news
table- latest (by date time) record would have an almost 100% chance of being selected
- first (by date time) record would have an almost 0% chance of being selected
- 50th (by date time) record would have a 50% chance of being selected
is there such a thing in mssql directly? or is there some function (best practice) in c# i can use for this?
thnx
** edit: the title is really horrible, i know. please edit if you have a more descriptive one. thnx