Leasing and trade in

Can you lease a car/total $12k/ and have a trade in that worth $20k? What is the best solution? Buying instead leasing?