title: SQL Decode Null Values
body: <p>I have the below query.  When <code>type_id is null</code> I want it to be grouped by the name "unknown".<br />
  How can I do it.<br />
  I know there is a decode function but I'm not sure how to use it. </p>
  
  <pre><code>select type_id,
         name
    from test_table
   group by decode(type_id,'Unknown'),
            name;
  </code></pre>
  
  <p>how can I do it?</p>