title: how to check if column value is not null then check next column using sql query
body: <pre><code>SELECT users.group_id, testtb.id 
  FROM users 
  LEFT JOIN testtb on users.group_id =testtb.id 
  where testtb.id is not null ORDER BY users.group_id
  </code></pre>
  
  <p>in my above query I want to use one more <code>where</code> condition(ie <code>where testtb.name is not null</code>)  if <code>testtb.id is not null</code></p>