I am looking to create column which is created using multiple columns and multiple criteria. This column is the discount column which is created by some calculation on the price column TO explain the table below,
- if its brand A & B then discount column is 20% of price
- if its Unique id is 6352,7869 then if price between 60 to 70 then discount 10, if 70 to 80 discount 20
- if unique id 4094 and brand E and years_active blank then discount = price.
What is the best way to create this discount column.