sql query to count two columns with same values <p>I've got a table with 2 columns with keywords, and I need to count the occurrence of them. I can do that separately, one column at the time, and add the totals later, with a regular count,</p> <pre><code>select count (id), kw1 from mytable group by kw1 </code></pre> <p>and the same for kw2, but I need to get the info straight from the db.</p> <p>So the table is something like:</p> <pre><code>id kw1 kw2 1 a b 2 c d 3 b 4 e a </code></pre> <p>so the idea is to get how many times has been used each keyword, so the result should be something like:</p> <pre><code>'a' 2 'b' 2 'c' 1 'd' 1 'e' 1 </code></pre> <p>Thanks in advance</p> <p>PS: Sorry, I forgot, but just in case, I'm working on Oracle 10g</p>