Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将PickAlgoScorefromRow1与PickAlgoScorefrom进行比较Row2,如果两个数字之间的百分比差异为> 50%,则显示给我,否则,忽略。我还需要对表中的每两行执行此操作。
PickAlgoScore
Row1
Row2
> 50%
好吧,你没有提到你的 rdbms 版本,但通常你可以用分析函数(Windows 函数)来做这种事情。如果您有问题,请查看 LEAD 和 LAG 函数,您可以在其中将记录与之前的记录进行比较。