A bakery sells 3/4 of a cake for $9. If the bakery sold 12 cakes in total, but only 2/3 of these cakes were sold as whole cakes and the rest were sold as 3/4 cakes, how much total revenue did the bakery make from selling the cakes? Let's think step by step and output the final answer within \boxed{}.
user