title: Enter data for missing category in snowflake
body: <p>I have a table like</p>
  <p><a href="https://i.stack.imgur.com/JNsKo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JNsKo.png" alt="enter image description here" /></a></p>
  <p>For each keyword, there are 2 devices - mobile and desktop. If entry for only one device is found, then it should automatically create the entry for other device keeping the data in rest of the columns same. I am currently doing a full outer join which is working fine for the case where one device category is missing but generating duplicates where both devices are present. For example,
  my current query is giving the result as</p>
  <pre class="lang-sql prettyprint-override"><code>select a.keyword, b.device, a.rating 
  from kw a full outer join kw b 
  on a.keyword=b.keyword and a.rating=b.rating 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Zhufx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zhufx.png" alt="enter image description here" /></a></p>
  <p>How do I get the result as</p>
  <p><a href="https://i.stack.imgur.com/AywKK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AywKK.png" alt="enter image description here" /></a></p>