肯定会有偏差,For example:declare @t table(id int,code int) insert into @t select 1, 3 union all select 2, 4 union all select 3, 1 union all select 4, 2 union all select 5, 4 union all select 6,10 union all select 7, 5 union all select 8, 5declare @multiplier bigint set @multiplier=1select @multiplier=@multiplier*code from @tselect @multiplierselect exp(sum(log(code))) from @t
insert into @t select 1, 3
union all select 2, 4
union all select 3, 1
union all select 4, 2
union all select 5, 4
union all select 6,10
union all select 7, 5
union all select 8, 5declare @multiplier bigint
set @multiplier=1select @multiplier=@multiplier*code from @tselect @multiplierselect exp(sum(log(code))) from @t