To provide a novel substituted azole compound having a GPR119-activating activity and useful particularly for the prevention and/or treatment of diabetes and obesity. Provided are: a novel substituted azole compound represented by formula (I) (wherein each substituent is as defined in detail in the description the ring A represents an aromatic ring which may be substituted by a substituent as defined in the description the ring B represents a ring selected from rings represented by formula (II) R1 represents a hydrogen atom, an alkyl group or the like R2 represents an alkyl group or the like the ring C represents a benzene ring, a 5- to 6-membered aromatic heterocyclic ring or the like and R3 and R4 independently represent an alkyl group which may be substituted or the like), a tautomer or pharmaceutically acceptable salt of the compound, or a solvate of the compound or the tautomer or pharmaceutically acceptable salt.本發明係以提供具有GPR119活化作用,特別對於糖尿病、肥胖預防及/或治療為有用之新穎取代唑化合物為課題。本發明係關於提供式(I)(式中的各取代基在本文中已詳細定義,環A表示在可由本文中所定義之取代基所取代的芳香環,環B表示選自由式(II)的環,R1表示氫原子或烷基等,R2表示烷基等,環C表示苯環或5-6員芳香族雜環等,R3及R4表示可被取代之烷基等)所示新穎取代唑化合物、該化合物的互變異構物或者其醫藥上可被許可的鹽或這些溶媒合劑者。