A compound of formula (I) or a pharmaceutically acceptable salt or prodrug ester thereof, wherein the groups R2, R3, R4, Q, X and Y are as defined in the specification, is useful in the treatment of bone conditions related to increased calcium depletion or resorption.