create trigger using following

Given the following tables, there is a $100 club annual membership fee per customer. There is a business rule, if a customer has spent more than $5000 for the current year, then the membership fee is waived for the current year. But if the total spending of the current year gets below $5000 after the fee has been waived, the fee will be charged again. The total spending may be reduced by a return.

Please write a trigger to implement the business rule. The membership fee is stored in the Customer table.

create table Customer
(CustomerID int primary key,
 LastName varchar(50),
 FirstName varchar(50),
 MembershipFee money);

create table SalesOrder
(OrderID int primary key,
 CustomerID int references Customer(CustomerID),
 OrderDate date not null);

create table OrderDetail
(OrderID int references SalesOrder(OrderID),
 ProductID int,
 Quantity int not null,
 UnitPrice money not null
 primary key(OrderID, ProductID));