How to calculate percentage in oracle sql
<p>I have a table in which I have multiple IDs which can have a value or 0. The IDs come from different sources so I would like to know what is the percentage of IDs with the value 0 as a percentage of total IDs, for each source file.</p>

<p>Sample Data:</p>

<pre><code>ID  Source    
1    aaa     
0    aaa     
2    bbb     
0    ccc     
3    ccc     
0    ccc 
5    aaa 
0    bbb
6    bbb 
7    bbb
</code></pre>

<p>I need to display Output like:</p>

<pre><code>CountOfIDs0   TotalIDs Source  PercentageIDs0
2               3         ccc     66.6%%
1               3         aaa     33.3%%
1               4         bbb     25%
</code></pre>

<p>Thanks!</p>