Subject | Help with query |
---|---|
Author | mailgroupza |
Post date | 2007-02-14T13:36:12Z |
select distinct col_a, col_b from table_a
order by col_a, col_b
returns something like
col_a col_b
===== =====
cola-a colb-1
cola-b colb-1
cola-c colb-2
cola-c colb-3
cola-c colb-4
cola-d colb-5
cola-e colb-1
cola-e colb-2
cola-f colb-1
...
I want the query to only extract those results where col_a
has more than 1 occurance
ie the result should be ...
col_a col_b
===== =====
cola-c colb-2
cola-c colb-3
cola-c colb-4
cola-e colb-1
cola-e colb-2
hope someone is able to point me in the right direction
regards cao
order by col_a, col_b
returns something like
col_a col_b
===== =====
cola-a colb-1
cola-b colb-1
cola-c colb-2
cola-c colb-3
cola-c colb-4
cola-d colb-5
cola-e colb-1
cola-e colb-2
cola-f colb-1
...
I want the query to only extract those results where col_a
has more than 1 occurance
ie the result should be ...
col_a col_b
===== =====
cola-c colb-2
cola-c colb-3
cola-c colb-4
cola-e colb-1
cola-e colb-2
hope someone is able to point me in the right direction
regards cao