There has been a demand for a pharmaceutical composition which is used for a prophylactic and/or therapeutic agent for various diseases associated with PDE10 (for example, mental disorder, neurodegenerative disorder and the like). The present invention provides: a compound having a PDE10 inhibitory effect, in particular, a compound which is represented by formula (I) and is characterized by having a 4-heteroarylpyrazole-5-carboxylic acid amide structure, a pharmaceutically acceptable salt thereof, and a solvate of the compound or the salt a pharmaceutical composition which is characterized by containing, as an active ingredient, the compound, a pharmaceutically acceptable salt of the compound, or a solvate of the compound or the salt and a pharmaceutical use of the compound, a pharmaceutically acceptable salt of the compound, or a solvate of the compound or the salt.Se ha deseado desarrollar una composición farmacéutica, que se utilice en agentes para prevenir y/o tratar diversas enfermedades relacionó con la PDE10 (por ejemplo un trastorno mental y un trastorno neurodegenerativo). La presente invención proporciona: compuestos que tienen un efecto inhibidor de la PDE10, en particular, compuestos que tienen una estructura de la amida del ácido 4-heteroarilpirazol-5-carboxílico representada por la siguiente fórmula (I), o sus sales farmacéuticamente aceptables, o sus solvatos las composiciones farmacéuticas que comprenden, como ingredientes activos, los compuestos, o su sales farmacéuticamente aceptables, o sus solvatos y uso médico de los compuestos, o sus sales farmacéuticamente las aceptables, o sus solvatos. (ver Fórmula).