Provided are compounds having an inhibitory effect on sodium-dependent glucose cotransporter SGLT. The invention also provides pharmaceutical compositions, methods of preparing the compounds, synthetic intermediates, and methods of using the compounds, independently or in combination with other therapeutic agents, for treating diseases and conditions that are affected by SGLT inhibition.