title: Generate new table with data from old table, multiplied by lookup value
body: <p>In MySQL, having these two queries:</p>
  <pre><code>CREATE TABLE `country` (
    `name` varchar(100) NOT NULL,
    `value001` decimal(15,2) NOT NULL,
    `value002` decimal(15,2) NOT NULL,
    `value003` decimal(15,2) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  INSERT INTO country (name, value001, value002, value003) VALUES('Bulgaria', 100, 200, 300),('Portugal', 5, 6, 7),('Belarus', 20, 30, 40);
  
  CREATE TABLE `exchange-rate`(
    `name` varchar(100) NOT NULL,
    `rate` decimal(15,2) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  INSERT INTO `exchange-rate` (name, rate) VALUES('Bulgaria', 1.9),('Portugal', 1.1),('Belarus', 10);
  </code></pre>
  <p>I get the following tables:</p>
  <p><a href="https://i.stack.imgur.com/abrJ5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/abrJ5.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/n3RCM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n3RCM.png" alt="enter image description here" /></a></p>
  <p>My idea is to create a third table, where the values from the first table will be multiplied by the values for the second one. E.g., for Belarus and Portugal it will look like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>name</th>
  <th>value1</th>
  <th>value2</th>
  <th>value3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Belarus</td>
  <td>200</td>
  <td>300</td>
  <td>400</td>
  </tr>
  <tr>
  <td>Portugal</td>
  <td>5.5</td>
  <td>6.6</td>
  <td>7.7</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What have I done so far?</p>
  <pre><code>drop table if exists new_country;
  create table if not exists new_country;
  select c.*
  from country c
  left outer join --or something wiser?
  (
  --probably something is to be written here
  )
  </code></pre>