Sonic attenuating method for distinguishing between oil, water and gas