The present invention relates to pyrazole compounds represented by the formula (I): wherein R1 represents phenyl which may be substituted, R2 represents H, halogen, alkyl, alkoxy, alkylthio, alkylsulfinyl, alkylsulfonyl or substituted amino, Q represents CH or N, R3 represents H, alkyl or amino, R4 represents the formula (II) to (V): wherein R7 represents H or alkyl, R8 represents H, alkyl or substituted amino, R9 represents H or alkyl, R12 represents H, alkyl, halogeno alkyl or substituted amino,or pharmaceutically acceptable salts thereof, and a medical composition containing the same as effective ingredient.