SQL reduction in module.