<Tr> <Td> 15 July </Td> <Td> 2 July </Td> <Td> Russian offensive ends . Trotsky joins Bolsheviks . </Td> </Tr> <Tr> <Td> 16--17 July </Td> <Td> 3--4 July </Td> <Td> The "July Days"; mass armed demonstrations in Petrograd, encouraged by the Bolsheviks, demanding "All Power to the Soviets". </Td> </Tr> <Tr> <Td> 19 July </Td> <Td> 6 July </Td> <Td> German and Austro - Hungarian counter-attack . Russians retreat in panic, sacking the town of Tarnopol . Arrest of Bolshevik leaders ordered . </Td> </Tr> <Tr> <Td> 20 July </Td> <Td> 7 July </Td> <Td> Lvov resigns and asks Kerensky to become Prime Minister and form a new government . Established 25 July . </Td> </Tr>

When was the russian revolution and why did it happen