The present invention provides an sulfonamide derivative having DP receptor antagonistic activity and a pharmaceutical composition comprising the said compound as an active ingredient, and further a therapeutic agent for treating allergic diseases. A compound of the general formula (II): wherein the ring A is an aromatic carbocyclic ring etc.; the ring B is a nitrogen-containing non-aromatic heterocyclic ring etc.; the ring C is an aromatic carbocyclic ring etc.; R1 is carboxy etc.; R2 is independently a halogen atom etc.; R3 is optionally substituted alkyloxy etc.; R4 is independently a halogen atom etc.; R5 is independently optionally substituted alkyl etc.; M is sulfonyl etc.; Y is a single bond etc.; L1 is a single bond etc.; L2 is a single bond etc.; k is 0, 1, 2, 3 or 4; n is 0, 1 or 2; and q is 0, 1, 2 or 3; provided that a) k is not 0 when the ring B is a 6-membered nitrogen-containing heterocyclic ring containing one or two nitrogen atom(s) and the ring C is a benzene ring, etc.; a pharmaceutically acceptable salt or a hydrate thereof.