Mysql
 sql >> Base de données >  >> RDS >> Mysql

MySQL :ajouter et multiplier sur différentes tables

SELECT SUM(first_table.link_id * second_table.factor) as ANSWER
FROM   first_table
LEFT JOIN second_table on first_table.link_id = second_table.id
WHERE  first_table.counted = 1