title: Error: near line 1: near "(": syntax error: SQLite Error when trying to create a view
body: <p>I am attempting to create a view in SQLite but apparently there is a syntax error, I'm not sure what it is. This is the query:</p>
  
  <pre><code>CREATE VIEW personDetails(fname, lname, bdate, bplace, carsowned,ticketsRcvd) AS
  SELECT p.fname,p.lname,p.bdate,p.bplace,COUNT(DISTINCT(r.vin)),COUNT(DISTINCT(t.violation))
  FROM persons p LEFT JOIN registrations r ON p.fname = r.fname
  LEFT JOIN tickets t ON r.regno = t.regno
  GROUP BY p.fname,p.lname, p.bdate,p.bplace;
  </code></pre>