This invention provides new compounds having NPY Y5 antagonistic activity. The present inventors found that a compound of the formula (I):wherein R1 is substituted or unsubstituted alkyl or the like; p, q and r are each independently 0 or 1; ring A is oxadiazole; and R2 is substituted or unsubstituted alkyl or the like, has NPY Y5 antagonistic activity.