title: Write a SQL query to find and display a customer who made 2 consecutive orders in same category?
body: <p>Question: Write a SQL query to find and display a customer who made 2 consecutive orders in the same category?</p>
  <p>I am struggling with the answer. Any help would be appreciated.</p>
  <p>Queries:</p>
  <pre><code>CREATE TABLE customers (
      id INTEGER PRIMARY KEY AUTO_INCREMENT,
      name TEXT,
      email TEXT);
  
  CREATE TABLE orders (
      id INTEGER PRIMARY KEY AUTO_INCREMENT,
      customer_id INTEGER,
      item TEXT,
      price REAL,
      ORDER_DATE DATETIME,
      category TEXT);
  
  INSERT INTO customers (name, email) VALUES (&quot;Doctor Who&quot;, &quot;doctorwho@timelords.com&quot;);
  INSERT INTO customers (name, email) VALUES (&quot;Harry Potter&quot;, &quot;harry@potter.com&quot;);
  INSERT INTO customers (name, email) VALUES (&quot;Captain Awesome&quot;, &quot;captain@awesome.com&quot;);
  
  INSERT INTO orders (customer_id, item, price,ORDER_DATE,category)
      VALUES (1, &quot;Sonic Screwdriver&quot;, 1000.00,'21-04-15 09.00.00','tools');
  INSERT INTO orders (customer_id, item, price,ORDER_DATE,category)
      VALUES (1, &quot;Light&quot;, 1000.00,'21-10-15 09.00.00','tools');
  INSERT INTO orders (customer_id, item, price,ORDER_DATE,category)
      VALUES (2, &quot;High Quality Broomstick&quot;, 40.00,'20-12-20 09.00.00','cleaner');
  INSERT INTO orders (customer_id, item, price,ORDER_DATE,category)
      VALUES (3, &quot;TARDIS&quot;, 1000000.00,'21-01-20 09.00.00','other');
  </code></pre>