I need to create a Last Year table and that's what I do:
addyears (Timestamp,-1) as Timpestamp_ly,
Timestamp as Timpestamp_ly,
net_price as net_price_ly,
The problem of this structure is that LY_table uses the status field of the current timestamp, I mean that if the status of the actual timestamp doesn'tmatch with the status of the last year timestamp the LY_table doesn't work.
The only way it works is if I name the status field as status_ly in the LY_table but I need to keep the old name to compare both net_prices in a graph