create table pk.tests (id bigint not null, pubid integer not null, name varchar, constraint "pk" primary key(id, pubid));

select min(id), max(id), count(1) from pk.tests;