The present invention provides a kind of with BTK inhibiting effect and with the new compound of cell inhibitory effect effect in what. Also, provide a kind of base what BTK inhibiting effect, prevention and/or treatment to what disease relevant to the BTK, particularly cancer useful medicine. Formula (I) compound represented or its salt (in formula, R1~R3, W, A, Y and Z have the meaning being defined as in the description).本發明在於提供一種具有BTK抑制作用並且具有細胞增殖抑制效果的新型化合物。並且,提供一種基於BTK抑制作用、對於與該BTK相關的疾病、特別是癌的預防和/或治療有用的醫藥。式(I)所示的化合物或其鹽〔式中,R1~R3、W、A、Y和Z具有如說明書中所定義的意義〕。