The present invention provides a novel compound having a superior activity as an ERR-α modulator and useful as an agent for the prophylaxis or treatment of ERR-α associated diseases.The present invention relates to a compound represented by the formulawherein each symbol is as defined in the specification, or a salt thereof.