What do the transactions on the blockchain look like where a miner spends their fees - not the block reward of 50/25/12.5 BTC they have earned per block but the fees users have paid for each transaction to be mined to a block? How are these referenced by the next transaction because fees are not specified in a transaction output?
I understand that a miner states the amount of bitcoin they wish to receive as a reward in the coinbase transaction for a block (they are even able to specify a lower reward than the maximum permitted by the network). They can then spend the outputs from the coinbase by referencing it in the next transaction. But how are the fees the miner received for all the transactions in that block spent?