shashi ahuja <shashiahuja(at)yahoo(dot)com> writes:
> Now wht happen is in my final query of test1 and test2, "total_message" and "con_phone" both
> the columns output is changed by 5 times which is a random value.
Would you mind providing this example in the form of a psql script that
reproduces the problem starting from an empty database? (ie, create and
fill the tables and execute the query that gives a bogus result)
Guessing at your table declarations is not a productive use of our time.
regards, tom lane