Another alternative is to create a view:
CREATE VIEW test AS
SELECT id, (black * 1) + (yellow * 1) + (white * 0.4) / qty_job as total FROM counter;
The rest should be easy, you can do something like this:
select
counter.id,
black,
yellow,
white,
test.total
from
counter,
test
where
counter.id = test.id
source
share