To provide a drug having inhibitory activity against ENPP2, which is a target different from that of existing drugs, as a useful drug for patients with urinary discharge disorders whose effects are insufficient with existing drugs. The present invention relates to a compound represented by the general formula (I) having ENPP2 inhibitory activity (wherein the definitions of the respective groups have the same meanings as described in the specification), salts or solvates thereof, or their The present invention provides a prodrug and a preventive, therapeutic and / or symptom-improving agent for urinary discharge disorders containing them as active ingredients.既存薬では効果が不十分な尿排出障害患者に有用な医薬品として、既存薬とは異なる標的であるENPP2に対して阻害活性を有する薬剤を提供すること。本発明は、ENPP2阻害活性を有する一般式(I)(式中、各基の定義は明細書中の記載と同じ意味を表わす。)で示される化合物、その塩もしくはその溶媒和物またはそれらのプロドラッグならびにそれらを有効成分として含有する尿排出障害の予防、治療および/または症状改善剤を提供する。