Is this an incoming or outgoing transaction I recently looked at this bitcoin transaction:

transaction: 3b0e8fae9640e1d043cfef14815c6885e58d71e7ee31cfa53f9c9d5acb138a4d

For those who do not want to look at the transaction, I will give a simplified example of it:

There are 3 inputs:

X pays 0.5BTC
Y pays 2BTC
Z pays 3 BTC

There are 2 outputs:

A which gets 2.5BTC
X which gets 3 BTC

As you can see, the "balance" from Y and Z went to X, but X also paid out.

Would this be classed as a incoming or outgoing transaction?

The wallet balance would probably not change as they "may" own all of the addresses.

I would like to assume that they do not.

Should I class them as separate transactions?
It depends on your perspective and which addresses you control.

If you are Y or Z, it's an outgoing transaction.

If you are A, then it's incoming,

If you are X, it could be both. If X also controls Y or Z, then it's outgoing as he is sending money to A and the output that sends to X is just a change output. If X does not also control Y or Z, it would be both as Y and Z are simultaneously paying him and A while X is simultaneously paying A and receiving money from Y and Z.