I have a table Net where is the list of networks
-- Table: net
CREATE TABLE net
(
id serial NOT NULL,
cidr cidr,
description text,
CONSTRAINT net_pkey PRIMARY KEY (id )
)
I need to select all the networks that do not. belong to other networks. ie only network without subnets. How to build a query?
cidr:
10.0.0.0/8
10.1.0.0/16
10.2.0.0/16
10.3.0.0/16
10.3.1.0/24
10.3.2.0/24
10.3.3.0/24
10.15.1.0/24
10.15.2.0/24
10.15.3.0/24
172.20.0.0/16
172.21.0.0/16
172.0.0.0/8
11.11.11.0/24
Top rated net is 10.0.0.0/8, 172.0.0.0/8, 11.11.11.0/24