I am getting below Error while creating view
View's SELECT contains a subquery in the FROM clause
please suggest an alternate option or method for this piece of code
Create or Replace view mydb.cnCustomerv
as
Select * from mydb.customermaster
left join
(
Select customertransaction.transactioninvoiceno , customertransaction.transactionvalue , customertransaction.cardnumber from mydb.customertransaction order by customertransaction.transactionid desc limit 1
) as a on
mydb.customermaster.cardnumber = a.cardnumber
left join
(
Select customerredemption.transactionuniquecode , customerredemption.redemptionvalue , customerredemption.cardnumber from mydb.customerredemption order by customerredemption.redemptionid desc limit 1
) as B on
mydb.customermaster.cardnumber = B.cardnumber;