A compound represented by the formula (I) or a pharmaceutically acceptable saltthereof: (I) wherein X to X independently represent acarbon atom or the like; the ring A represents a 5- to 6-membered heteroaryl having1 to 4 heteroatoms independently selected from the group consisting of a nitrogenatom, a sulfur atom and an oxygen atom; X represents an oxygen atomor the like; X represents a carbon atom or the like; Het represents a 5- or 6-memberedaliphatic heterocycle; R represents an aryl or the like; Rrepresents a formyl group or the like; and R represents a -Calkyl or the like. The compound or salt has a glucokinase activation effect andis useful as a therapeutic agent for diabetes.