Check if column has same value in any row I have the following case.
+-----------+--------+-------------+
| ArticleID | UserID | IsConnected |
+-----------+--------+-------------+
|         1 |     25 | True        |
|         1 |     45 | True        |
|         2 |     55 | False       |
+-----------+--------+-------------+


So I need to create a View who will return True if there is more than 1 record in the table with same ArticleID.
To make this easier the table looks the same, but without IsConnected column.
Something like this, may be
select 
 article_id, user_id, 
 case 
   when count(1) over (partition by article_id) &gt; 1 then 'true' 
   else 'false' 
 end is_connected
from something