The present invention provides nitrogen-containing fused-ring derivatives represented by the following general formula, or pharmaceutically acceptable salts thereof, or prodrugs thereof, which exhibit an excellent inhibitory activity in human SGLT and are useful as agents for the prevention or treatment of a disease associated with hyperglycemia such as diabetes, postprandial hyperglycemia, impaired glucose tolerance, diabetic complications or obesity, in the formula R1 represent H, an optionally substituted alkyl group, an alkenyl group, etc. R2 represent H, a halogen atom or an alkyl group R3 and R4 represent H, OH, a halogen atom, an optionally substituted alkyl group, etc. Y represents CH or N Q represents alkylene, alkenylene, etc. ring A represents an aryl group or a heteroaryl group G represents a group represented by the following general formula (G-1)or(G-2) (in which E1 represents H, F or OH and E2 represents H, F, a methyl group, etc.), and pharmaceutical compositions comprising the same, and pharmaceutical uses thereof.