old wallet.dat with only incoming tx from mining, now shows 0 coins even after rescan and all the transactions are there I found an old wallet.dat it contained hundreds of transactions while i was mining.

I've replaced the wallet.dat in a new Bitcoin Core wallet, rescanned, all the txid are showing but the amount of bitcoin stored there is not! It now shows 0 coins

I know i never sent them out + all the tx are inputs nothing is out, so far i tried rescan. 

any idea how can i extract for example a master privat key for the entire wallet, and import it somewhere ?
If you found an old wallet (prior to Core 0.13 which was released in August 2016), it wasn't using BIP32 HD. So there is very very likely no master private key,... instead, there are a large number of private keys.

You can use dumpwallet &lt;filename&gt; in the GUI console or via RPC to extract your private keys to a text file and import them into a different application.

But if you see transactions in Bitcoin Core and your balance is zero, this mostly means that there must be one or multiple spending transactions that have spent your mined bitcoins.