In this double-blind phase 3 trial , patients ( aged 18 years ) with type 2 diabetes and HbA1c concentrations of 7-10 % , despite metformin treatment and diet and exercise counselling , were randomly assigned in a 1:1 ratio with a computer-generated random sequence , stratified by HbA1c , estimated glomerular filtration rate ( eGFR ) , and region , to empagliflozin ( 25 mg once daily , orally ) or glimepiride ( 1-4 mg once daily , orally ) as add-on to metformin for 104 weeks .