Sum with two indices, how to handle the condition $i\neq j$? I'm given
$$
\sum_{i,j=1, i \neq j}^{N} ij \tag 1
$$
I assume this is a short hand for
$$
\sum_{i=1}^{N}
\Bigg (
\sum_{j=1}^{N} ij 
\Bigg ) 
\qquad? \tag 2
$$
But where does $i\neq j$ belong, to the inner or outer sum?
Example with $N=2$ and $i\neq j$ in the inner sum:
\begin{align}
\sum_{i,j=1 \\i\neq j}^{2} ij
&=
\sum_{i=1}^{2}
\Bigg (
\sum_{j=1, i \neq j}^{2} ij 
\Bigg ) 
\tag 3
\\
&=\sum_{i=1}^{2}
\Bigg (
i1+i2
\Bigg )
\tag 4
\\
&=
(11+12 + 21 + 22)
\tag 5
\\
&\text{\{Now discard 11 och 22\}}\\
&=23
\end{align}
I guess the end result is correct, but I don't think my approach is correct ("Now discard"). How should I handle the condition $i\neq j$?

If you're familiar with the Kronecker delta You can write that sum as the following:
$$\sum_{i=1}^{N}\sum_{j=1}^N (1 -\delta_{ij}) ij$$
If $i = j$ then $\delta_{ij}= 1$ and that will cancel that turm of the sum
