I am writing a Query with SQL and couldn't figure it out yet...
My table looks like this:
Category Price Date
Cat1 20 2019-04
Cat2 12 2019-04
Cat3 5 2019-04
Cat1 23 2020-04
Cat2 17 2020-04
Cat3 8 2020-04
I would like to get a table that shows this:
Cat Pct_change Period
Cat 1 0.15 2019-2020
Cat 2 0.41 "
And so on.
I can get this category by category but I have like 100 categories, cant do this manually. It would be great, too, to see both prices side by side. What I don't (can't) allow is to generate new tables just saving the data to join separate tables...
Thank you!!