title: Join tables sql not invalidated
body: <p>I have two tables like these:</p>
  
  <pre><code>create table classe (
  id integer primary key,
  name varchar not null
  );
  
  create table alunno (
  id integer primary key,
  id_classe integer not null
  );
  </code></pre>
  
  <p>i would to take in a unique query the following data:</p>
  
  <ul>
  <li>classe.id</li>
  <li>classe.name</li>
  <li>count of alunno having a specific id_classe</li>
  </ul>
  
  <p>so i can do something like this:</p>
  
  <pre><code>select a.id, a.name, count(b.id) 
  from classe a, alunno b 
  where a.id = :1 and b.id_classe = a.id;
  </code></pre>
  
  <p>but if the count = 0 I have null value in resultset..so i would to have always the info of stanza record and if no one alunno record is present for that stanza i would count = 0 that not invalidate the entire output..How can i have this resultset?</p>
  
  <p>I tried also with left join but probably is wrong structured..</p>
  
  <p>I add that i'm using SQLite so some SQL commands can not be used on it</p>
  
  <p>Thanks a lot for your help.</p>