Bets sum sql complete