os2sam is right, but just to elaborate on this subject:
A miner can chose up to 1Mb of transactions to fill up the block he's currently working on. This includes the coinbase transaction rewarding 12.5 BTC + sum of the fees of the picked transactions to the miner (the miner could potentially also use somebody else's address for the coinbase reward).
After this, the miner calculates a merkle tree of all transactions in the block. He then generates a block header using the highest element of the tree, the previous block header and some other data and starts hashing this new header. If he finds a block header whose hash is better than the current diff, he can push his block to the network.
If you solo mine with 5Gh, you can pick whatever transactions you'd like, but the odds of you finding a block header whose hash is under the current diff target is astronomically small. So the odds the block you were working on can be broadcasted (and accepted) by/to the other nodes of the network is astronomically small...
As a matter of fact, at current diff:
https://www.coinwarz.com/calculators/bitcoin-mining-calculator/?h=5&p=1&pc=0.10&pf=0.00&d=804525194568.13200000&r=12.50000000&er=2591.67940000&hc=0.00It will take you (ON AVERAGE ), 7998632 days to solo mine a block... So you'll have to wait an average of 7998632 days before your transaction gets included in your own (valid and broadcasted) block... Maybe you're better off paying a decent fee and broadcasting the transaction to the other nodes, so some other miners will also be tempted to put your transaction into the block they're working on