The present invention relates to a compound represented by the formula wherein each symbol is as defined in the present specification, which has a superior RBP4-lowering action and is useful as a pharmaceutical composition for the prophylaxis or treatment of a disease or condition mediated by an increase in RBP4.