I have two tables:
Customers : Save customer data, such as: ID, Name, Points .
Sales : Registers the sales made by each customer, like: Customer_ID, Service ( 10 minutes for example ), among others.
I would like to see that in the Points field of the Customers table the services are registered until they reach X amount, if it exceeds that amount (for example 90) it updates it to Zero for the next sale.