Hey!

I have two tables as illustrated below:

people

name| #houses
------|-----------
a | 3
b | 5
c | 9

rich
name| #houses
------|-----------
w | 13
f | 19
g | 11

I need to create a trigger to insert a tuple of the people table into the rich every time the update of the people table causes someone's no. of houses to go above 10.
Please help me with the code.