SQL count of values from different columns
<p>I've got a <code>Dog</code> table. Each dog has <code>Breed</code> and can have 0 to 2 photos. I need to recieve count of photos of all dogs for each breed: table with <code>BreedId</code> and matching <code>PhotosCount</code>. So result table should be:</p>

<pre><code>BreedID|PhotosCount
-------------------
1      |3
-------------------
2      |1
-------------------
</code></pre>

<p><a href="https://i.stack.imgur.com/dJFzJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dJFzJ.png" alt="Dogs"></a></p>