select * from colours c where exists ( select null from bricks b where b.colour = c.colour_name and b.brick_id < 5 );