Provided is a compound having an excellent ATX inhibitory action and useful for the prevention or treatment of diseases in which ATX is involved. A carboxylic acid compound represented by the following general formula (1) or a pharmacologically acceptable salt thereof.{Wherein each symbol is as defined in the specification.}本發明提供一種化合物,係具有優異的ATX抑制作用,且有用於預防或治療與ATX相關的疾病。一種下列通式(1)所表示的羧酸化合物或其藥理學上可容許之鹽。{式中,每個符號係如同說明書中所定義者}。