Oracle SQL Pivot with exclusions
<p>I have a set of data:</p>

<pre><code>SELECT * FROM costings
</code></pre>

<p>Output:</p>

<pre><code>section von         part    price
5       2013000043  3019    -15000
5       2014000041  1547    18000
5       2014000041  3019    -15000
5       2014000071  1547    18000
5       2014000071  3019    -15000
5       2016000018  1547    12000
5       2016000018  3019    -10000
5       2014000081  1549    3244.8
5       2014000081  3019    -1474
5       2015000040  1549    3244.8
5       2015000040  3019    -1474
5       2016000021  1549    2506.8
5       2016000021  3019    -1474
6       2013000069  1566    5760
6       2013000069  3013    -4800
6       2013000128  1566    7200
6       2013000128  3013    -6000
6       2014000060  1566    5760
</code></pre>

<p>And I want to output the data using pivot like this:</p>

<pre><code>section 1547   1549   1566
5       -40000 -4422  null 
6       null   null   -10800
</code></pre>

<p>Now the logic behind the expected value amounts is that per <code>von</code> you have multiple <code>part</code> numbers.</p>

<p>So taking <code>2014000041</code> as an example this has <code>1547</code> &amp; <code>3019</code>.</p>

<p>What i want is the <code>part</code> number beginning with <code>15</code> to be the pivot header but the <code>SUM</code> only to sum prices where the <code>part</code> DOESN'T begin with <code>15</code>.</p>