diff --git a/Database/Schemata/upgrade-0029.sql b/Database/Schemata/upgrade-0029.sql index 48d6ce28..41aad95c 100644 --- a/Database/Schemata/upgrade-0029.sql +++ b/Database/Schemata/upgrade-0029.sql @@ -45,7 +45,7 @@ BEGIN ( SELECT HotBitcoinAddressId, SUM(AmountSatoshis) AS UnspentAmountSum FROM HotBitcoinAddressUnspents - WHERE HotBitcoinAddressUnspents.HotBitcoinAddressId=hotBitcoinAddressId + GROUP BY HotBitcoinAddressId ) innerSelection ON HotBitcoinAddresses.HotBitcoinAddressId = innerSelection.HotBitcoinAddressId SET HotBitcoinAddresses.BalanceSatoshis = innerSelection.UnspentAmountSum