Zend certified PHP/Magento developer

Customer Collection add a LAST_ORDER_DATE field with join?

Would like to add a last order date field to a customer collection however not sure how to go about it. I’ve been researching joins to the order table however having a bit of difficulty with this one as can’t get my head around the one to many relationship and pulling the MAX created at date as a field.

MagentoCustomerModelCustomerFactory $customerFactory,
$collection = $this->_customerFactory->create()->getCollection()
            ->addAttributeToSelect("*")
            ->addAttributeToFilter('store_id',array('eq' => $storeId))->getSelect()
            ->load();

That was my original query and then looped through to get the customers orders etc however is extremely inefficient and feel it can be achieved faster by joining etc and hoping for a nudge in the right direction.

   $collection = $this->_customerFactory->create()->getCollection()
            ->addAttributeToSelect("*")
            ->addAttributeToFilter('store_id',array('eq' => $storeId))
            ->addAttributeToFilter('MAX(sales_order.created_at)',array('lteq' => $from))
            ->joinTable('sales_order', 'customer_id=entity_id',['MAX(sales_order.created_at) as last_order_date']);            

            
   $collection->getSelect()->group('e.entity_id');

Believe I have joined correctly with a lovely new calculated field however cannot seem to filter or use the where clause on the “last_order_date” field which seems like the easy bit.