title: sqlite3 python inner join syntax
body: <p>I have created a customer and orders table for a demo project using SQLITE3 and Python 3.  I am trying to select data from both the CUSTOMER and ORDERS table.</p>
  
  <p>CUSTOMERID is a foreign key on the ORDERS table.</p>
  
  <pre><code>import sqlite3
  conn = sqlite3.connect('promhire.db')
  print("Opened database successfully")
  
  cursor = conn.execute ('''\
              SELECT ORDERS.ORDERID, ORDERS.CUSTOMERID ORDERS.ORDERDATE CUSTOMERS.CUSTOMERID, CUSTOMERS.FIRSTNAME
              FROM ORDERS
              INNER JOIN CUSTOMERS
              ON ORDERS.CUSTOMERID = CUSTOMERS.CUSTOMERID
              WHERE CUSTOMERS.CUSTOMERID = 1''')
  for row in cursor:
      print(row)
  conn.close()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/5IHot.png" rel="nofollow noreferrer">screenshot of code</a></p>
  
  <p>The error I am getting is</p>
  
  <pre><code>"OperationalError: near ".": syntax error"
  Highlighting the last line of SQL.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BmGHd.png" rel="nofollow noreferrer">screenshot of error</a></p>
  
  <p>Any ideas how to code this correctly for Python?</p>
  
  <p>Thanks</p>