Explain how to write custom SQL Query in Magento?
We can write custom queries in Magento. Please follow the below given examples.
BY Best Interview Question ON 13 Jan 2019
Example
$resource = Mage::getSingleton(\'core/resource\');
$readConnection = $resource->getConnection(\'core_read\');
$var_query = \'SELECT * FROM products_table\';
$var_results = $readConnection->fetchAll($var_query);
var_dump($var_results);