Consult SQL statements or stored procedures

has two columns of data: all is the cumulative total amount of prizes issued, and use is the amount used
id all use
11500
220000
320000
420000
520000
6500
written with sqlserver sql sentence. One record is extracted from these six pieces of data, and the selected records need to be selected in proportion to the number of prizes issued. In other words, each prize appears at random, but it can guarantee how many times the prize will be produced every other time. It is not possible to give out all the prizes with small circulation in the early stage, but all the prizes can appear equally and not centrally.

< hr >

like the table above, there are a total of 1000 prizes, such as 6, which appears about every 20 times, as well as several other awards, probably in this range.

Nov.04,2021
Menu