This invention relates to compounds represented by formula (I): wherein the variables are defined as herein above, which are useful for treating diseases and conditions mediated by the sodium D-glucose co-transporter (SGLT), e.g. diabetes. The invention also provides methods of treating such diseases and conditions, and compositions etc. for their treatment.