title: Mysql Count with Inner join of two tables, Average Join
body: <p>Im eager to join two tables but can´t seem to get it right, the structure look like this.</p>
  
  <p><strong>Table1 (members)</strong>
  [UserLogin | Name ]</p>
  
  <p><strong>Table 2 (articles)</strong>
  [ArtID | Writer | Content]
  Article.writer is pointing to Members.UserLogin</p>
  
  <p>I want to display with as little code as possible, the whole list of registered UserLogins but also a count of how many articles they might have written, or if they have´nt written any they should still be on the list as well. </p>
  
  <p>What I would like:
  [UserLogin | Name | ArticlesWritten]</p>
  
  <p>What I´ve got so far is: </p>
  
  <pre><code>SELECT UserLogin, Name, Writer, count(*)
  FROM Article
  INNER JOIN Members on Writer=UserLogin
  GROUP BY UserLogin;
  </code></pre>
  
  <p>or </p>
  
  <pre><code>SELECT UserLogin, Name, count(Writer)
  FROM Article
  LEFT JOIN Members ON UserLogin = Writer
  GROUP BY 1;
  </code></pre>
  
  <p>Both of them lists everything fine in mysql, but none of them contains the UserLogins and Names of those who never has written any article. Can you guys point me in the right direction. I Understand the problem with my queries, but I have no idea on how to solve it. </p>
  
  <p>I´ve found similar problems on this forum, but I have´nt got to any solution from them. Might be a language barriere or just a plain lack of basic mysql-knowledge. </p>