我有三个表,其中重要字段标有连字符。如何使用具有 MAX invoiceDate 的发票中的 Customergiftcardpurchase.Amount 更新所有 Customer.MostRecentGiftCardPurchaseAmount?
Customer
-pk customerID
-Money MostRecentGiftCardPurchaseAmount
Customergiftcardpurchase
-fk customerID
-fk invoiceID
-Money amount
Invoice
-pk invoiceID
-Date invoiceDate