I found out the values and stored it in x and p.
Since x is the result of aggregate function it contains only one value. P contains multiple value.
Now I want to divide each value stored in p with x and insert it into the database. How do i do that?