Depends on your database and version thereof.
If it's new enough you can use the analytical function
Lag
Select Pid,
Sales,
Month1,
LAG(sales, 1, 0) OVER (PARTITION BY Pid ORDER BY Month1) - sales as difference
FROM MyTable
For other solutions you need to state your Database and model as it differs a bit between them
<update>
You can also use Row_Number:
With ordered as (
Select Pid,
Sales,
Month1,
Row_Number() OVER (PARTITION BY Pid ORDER BY Month1) rn
FROM MyTable
)
Select O1.Pid,
O1.Sales,
O1.Month1,
O2.Sales - O1.sales as Difference
FROM Ordered O1 left outer Join Ordered O2 on O1.rn = O2.rn - 1
</update>