It has been desired to develop a pharmaceutical composition, which is used in agents for preventing and / or treating various diseases related to PDE10 (e.g. mental disorder and neurodegenerative disorder). The present invention provides: compounds having PDE10 inhibitory effect, in particular, compounds having a 4-heteroarylpyrazole-5-carboxylic acid amide structure represented by the following formula (I), or their pharmaceutically acceptable salts, or their solvates; pharmaceutical compositions comprising, as active ingredients, the compounds, or their pharmaceutically acceptable salts, or their solvates; and medical use of the compounds, or their pharmaceutically acceptable salts, or their solvates.