I have table which contains double values stored in mysql database …I need to calculate the sum of three fields from three tables.
will the query select sum(r.columnname * (r.table2.columnname2/r3.columname1)) from table name.
where r,r1,r2 are table names.
columnname is the name of the column in the particular table concerned.all the column have double values in table .
will the above query give accurate value ..I am dealing with currencies in those tables .
can i round and sum the values or else any other query is available for this condition
If I’m understanding correctly that you want to round the sum, because it represents money, then you’ll want to do this: