Sex after miscarriage

How long were you told to wait to have sex after a miscarriage? I was six weeks when I miscarried and told it was okay after I was done bleeding. My friend was also six weeks and she was told to wait 3 weeks just curious