The present invention provides a triazole compound of the following formula:
a prodrug thereof or a pharmaceutically acceptable salt thereof. The above-mentioned triazole compound has superior HSD1 inhibitory activity, and is useful as an HSD1 inhibitor, a therapeutic drug of diabetes or a therapeutic drug of obesity or a therapeutic drug of metabolic syndrome.