title: SQL - Price increase over time
body: <p>I am sure that this question has already been answered, I just don't know what I am looking for.</p>
  
  <p>What I've got are price lists that update every month and I am looking for a query that lists all items (tnr) that increase in price by over 20% </p>
  
  <p>In this case I'd like to the the "tnr"</p>
  
  <pre><code>136234194430
  832124069830
  183078059150
  </code></pre>
  
  <p>I could loop through all items that I know that there is a smarter, faster, more elegant way to do it</p>
  
  <p>The dummy table to test stuff on</p>
  
  <pre><code>CREATE TABLE `pricelist` (
    `tnr` bigint(64) NOT NULL,
    `price` double NOT NULL,
    `discount` int(8) NOT NULL,
    `date` date NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  INSERT INTO `pricelist` (`tnr`, `price`, `discount`, `date`) VALUES
  (183078059150, 33.89, 26, '2018-08-01'),
  (514780535750, 78.73, 19, '2018-08-01'),
  (121475122010, 521.54, 16, '2018-08-01'),
  (726576581300, 168.36, 10, '2018-08-01'),
  (832124069830, 22.69, 50, '2018-08-01'),
  (342122275110, 131.5, 26, '2018-08-01'),
  (345067567690, 6.34, 26, '2018-08-01'),
  (121113618790, 195.5, 16, '2018-08-01'),
  (511681969780, 291.74, 23, '2018-08-01'),
  (411372385450, 129.75, 23, '2018-08-01'),
  (15097806600, 46.68, 19, '2018-08-01'),
  (613592995940, 259.47, 19, '2018-08-01'),
  (135414163780, 17, 19, '2018-08-01'),
  (726076671410, 68.91, 11, '2018-08-01'),
  (136234194430, 36.86, 23, '2018-08-01'),
  (541122685800, 10.25, 16, '2018-08-01'),
  (514722202230, 83.19, 23, '2018-08-01'),
  (125177976530, 257.12, 26, '2018-08-01'),
  (114377922120, 19.18, 23, '2018-08-01'),
  (642169317400, 2.54, 26, '2018-08-01'),
  (14085256200, 16.44, 14, '2018-08-01'),
  (114313045460, 22.46, 16, '2018-08-01'),
  (331014284930, 1042.02, 19, '2018-08-01'),
  (183078059150, 53.89, 26, '2018-09-01'),
  (514780535750, 78.73, 19, '2018-09-01'),
  (121475122010, 521.54, 16, '2018-09-01'),
  (726576581300, 168.36, 10, '2018-09-01'),
  (832124069830, 42.69, 50, '2018-09-01'),
  (342122275110, 131.5, 26, '2018-09-01'),
  (345067567690, 6.34, 26, '2018-09-01'),
  (121113618790, 195.5, 16, '2018-09-01'),
  (511681969780, 291.74, 23, '2018-09-01'),
  (411372385450, 129.75, 23, '2018-09-01'),
  (15097806600, 46.68, 19, '2018-09-01'),
  (613592995940, 259.47, 19, '2018-09-01'),
  (135414163780, 17, 19, '2018-09-01'),
  (726076671410, 68.91, 11, '2018-09-01'),
  (136234194430, 66.86, 23, '2018-09-01'),
  (541122685800, 10.25, 16, '2018-09-01'),
  (514722202230, 83.19, 23, '2018-09-01'),
  (125177976530, 257.12, 26, '2018-09-01'),
  (114377922120, 19.18, 23, '2018-09-01'),
  (642169317400, 2.54, 26, '2018-09-01'),
  (14085256200, 16.44, 14, '2018-09-01'),
  (114313045460, 22.46, 16, '2018-09-01'),
  (331014284930, 1042.02, 19, '2018-09-01');
  </code></pre>
  
  <p>Thanks a lot</p>