title: Compare values of different time-stamps and identify if they have changed
body: <p><strong><a href="https://dbfiddle.uk/?rdbms=mariadb_10.3&amp;fiddle=02a72c37ca816df230b5861457bf8180" rel="nofollow noreferrer">DB-Fiddle</a></strong></p>
  <pre><code>CREATE TABLE operations (
      id int auto_increment primary key,
      time_stamp DATE,
      product VARCHAR(255),
      plan_week VARCHAR(255)
  );
  
  INSERT INTO operations
  (time_stamp, product, plan_week 
  )
  VALUES 
  (&quot;2020-01-01&quot;, &quot;Product_A&quot;, &quot;CW01&quot;),
  (&quot;2020-01-01&quot;, &quot;Product_B&quot;, &quot;CW01&quot;),
  (&quot;2020-01-01&quot;, &quot;Product_C&quot;, &quot;CW01&quot;),
  
  (&quot;2020-03-15&quot;, &quot;Product_A&quot;, &quot;CW01&quot;),
  (&quot;2020-03-15&quot;, &quot;Product_B&quot;, &quot;CW02&quot;),
  (&quot;2020-03-15&quot;, &quot;Product_C&quot;, &quot;CW02&quot;),
  (&quot;2020-03-15&quot;, &quot;Product_D&quot;, &quot;CW01&quot;);
  </code></pre>
  <p><strong>Expected Result</strong></p>
  <pre><code>product          week_switch
  Product_A           no
  Product_B           yes
  Product_C           yes
  Product_D           no 
  </code></pre>
  <hr />
  <p>In the above result I want to check if a <code>plan_week</code> of a product has switched from one <code>time_stamp</code> to antoher <code>time_stamp</code>. <br>
  If the condition is met <code>yes</code> should be used as value. If not <code>no</code> should be inserted.</p>
  <pre><code>SELECT
  product
  FROM operations 
  GROUP BY 1;
  </code></pre>
  <p>I have no clue what kind of query I need to achieve this.
  Do you have any idea?</p>