Answer:
It had been a long-term strategy for the Ottoman Empire to capture Vienna because of its control over the Black Sea of Western Europe and the trade route from the Eastern Mediterranean to Germany. This battle was won by the combined force of the Commonwealth and the Holy Roman Empire.
Morale was low on both sides due to lack of progress, demanding tunnel and trench warfare and bad supply situation, were the main reasons for loss of the Ottomans.