The zd_user_id is our customer custom attribute.
$customerCollection = $this->customerFactory->create();
$customers = $customerCollection->addAttributeToFilter(
[
['attribute' => 'zd_user_id', 'null' => true],
['attribute' => 'zd_user_id', 'eq' => ''],
['attribute' => 'zd_user_id', 'eq' => 'NO FIELD']
],
'',
'left'
)
How could I get all customers with the attribute zd_user_id equal true via SQL?