鉴于下表的结构,我如何利用实体的红外工作来回以下合计的和集群领域。
Required fields
Grouped:
User.Forename
User.Surname
Aggregated:
Maximum(Order.OrderDate)
Count(Order.OrderId)
Sum(Payment.Amount)
Count(Order.OrderId for all orders in last 60 days)
Sum(Payment.Amount for all orders in last 60 days)
Tables
Users:
UserId (PK)
Forename
Surname
Orders:
OrderId (PK)
UserId (FK)
OrderDate
Payments:
PaymentId (PK)
OrderId (FK)
PaymentAmount