Assigning Binary Values to duplicates in SQL
<p>I have the following table</p>

<pre><code>Animal 
dog
dog
dog
cat
cat
</code></pre>

<p>I want to run a query that exports the following by assigning binary values.</p>

<pre><code>Animal Unique
dog    1
dog    0
dog    0
cat    1
cat    0
</code></pre>

<p>I tried using row_number over partition but I need subsequent values to be zero.</p>

<p>I need this as it will be connected to power query and a pivot table in which I want to sum the column so the I see the unique count of animals</p>