The coral fossil would be a better estimate of past water depth. This is because most corals inhabit shallow water reefs, less than 150 feet deep. In contrast, pelagic fish may inhabit any open water (pelagic) part of the ocean, with depths ranging anywhere from a couple of hundred feet deep to miles in depth.
Scientists use fossils to study earth history by identifying the fossil and what era it came from. By knowing what era the fossil came from and what location it was found, scientists can make assumptions about the earth formation at that time.