Subject Re: [firebird-support] Select records with duplicate fields
Author Dimitry Sibiryakov
On 19 May 2006 at 1:13, markd_mms wrote:

>actor_id title_id
>1 1
>2 1
>3 2
>
>and the result would be
>
>actor_id
>1
>2

SELECT actor_id FROM your_table a
WHERE EXISTS(SELECT * FROM your_table b
WHERE b.title_id=a.title_id AND b.actor_id<>a.actor_id)

--
SY, Dimitry Sibiryakov.