Magento 1 customer group id stored in sales_flat_order
table while admin order grid fetch collection from sales_flat_order_grid
so for getting customer group information must get data from sales_flat_order
table.
magento order grid collection & column manage from app/code/core/Mage/Adminhtml\Block/Sales/Order/Grid.php
so first join table in _prepareCollection()
function as below.
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->joinLeft(
'sales_flat_order',
'main_table.entity_id = sales_flat_order.entity_id',
array('customer_group_id')
);
$this->setCollection($collection);
now add customer group column in grid with drop-down option as below (add this in _prepareColumns() function)
$groups = Mage::getResourceModel('customer/group_collection')
->addFieldToFilter('customer_group_id', array('gt'=> 0))
->load()
->toOptionHash();
$this->addColumn('customer_group_id', array(
'header' => Mage::helper('customer')->__('Group'),
'index' => 'customer_group_id',
'filter_index' => 'sales_flat_order.customer_group_id',
'type' => 'options',
'options' => $groups,
));