Re: Help on query
Posted by: Peter Brawley
Date: December 30, 2018 08:49PM

One step at a time ...

1. These are the ip_address_id values that occur just once in ip_pool ...

select ip_address_id, count(*) N
from ip_pool
group by ip_address_id
having N=1;

2. Join that result to ip_addresses ...

select a.ip_address
from ip_addresses a
join( 
  select ip_address_id, count(*) N
  from ip_pool
  group by ip_address_id
  having N=1
) b on a.id = b.ip_address_id;

Options: ReplyQuote


Subject
Written By
Posted
December 30, 2018 06:16PM
Re: Help on query
December 30, 2018 08:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.