In this article we will check How to write a fetchPairs method in Magento 2. Create a MySQL fetchPairs() query in the Magento standard way to retrieve all SQL result rows as an array of key-value pairs. You can use
How to use fetchPairs method in Magento 2
