Query builder - nested select


I’m trying to convert a native SQL query and wondered if anybody has an example of using an inner select statement? My original statement part reads as follows and I’m not sure of the syntax to create a nested select statement

        PickItems.storeCode AS storeCode,
            "PickItems AS PIALL 

Many thanks


Query builder uses Knex.js, check the docs for that, they have examples for that I think.