Tuesday, 15 January 2013

mysql - Getting the sum of several columns from two tables result is not correct -


I'am trying to get the sum of the two columns from different tables, even though I got great posts on ads is. Some of them

helped me
  

This query amount of coulmns down somehow Incorrect total, Returns (materialprice column Coulmn)> mysql> TBL AS_Servicesets; + ---------- + ---------- + | Ticket_id | Rate | + ---------- + ---------- + | 11 | 250.00 | | 11 | 300.00 | | 11 | 400.00 | | 9 | 300.00 | | 9 | 300.00 | | 9 | 1500.00 | | 9 | 250.00 | + ---------- + ---------- + Total 2 350.00 mysql & gt; Tbl as_ticketmaterials; + ---------- + --------------- + | Ticket_id | Physical value. + ---------- + --------------- + | 11 | 100 | | 9 | 20 | | 9 | 50 | + ---------- + --------------- + 70.00 total is

query ------- -------------- ////