|MadSci Network: Earth Sciences|
This is a very hard question to answer because I don't think anyone has ever surveyed the depths of desert and beach deposits to calculate either average or record values. There are also actually several different questions in here, but I'll try to keep it manageable.
But three factors would determine total thickness of the deposit:
(A) How rapidly material is deposited.
(B) How much time you have to deposit the material.
(C) Whether or not there are times when material is removed, and how much.
For example, if the sand is deep in one place, maybe it is because it has had a long time to pile up. Maybe in another place there's a river nearby that is feeding the beach more. Would it be fair to compare both beaches, even if they have the same depth? Also, don't forget that sand in these places is always moving--so the actual depth of the surface deposit there can easily change, sometimes in a matter of months. Also, it depends on geologic history. Maybe there are thousands of meters of sand deposits from beaches and other coastal landforms left behind millions of years ago, like the US Gulf Coast. Or there might be a much younger fossil coral reef a meter or two down, as is sometimes seen in the Bahamas.
Deserts also have this sort of variability, from no sand at all, to sand seas hundreds of meters thick. The depths could be considerable, though. In the Grand Canyon of Arizona, the Coconino Formation (an ancient desert sandstone) varies between 115 and 200 meters of thickness (1) and the Navajo Sandstone, an ancient desert sandstone in Zion National Park, Utah, has a maximum thickness of about 670 meters. (2) The deposits of the modern-day Sahara are generally less than 100 meters thick, though there are some sandy landforms that can reach 450 meters high. (3)
As for the part about salty ground water near the coast, usually near the ocean there is a lens of fresh ground water "floating" on top of denser salty ground water. The thickness of the freshwater layer varies with the porosity of the sand or rock, and how much rainfall the area gets. Sometimes high tides change the depth of the freshwater-saltwater contact and sometimes too much pumping of groundwater from wells can cause the saltwater contact to come closer to the surface. This can be a problem, as it can make well water undrinkable. So, unfortunately, the only answer I can really give is "it depends". There is no single number that would be true for every coastline.
Finally, you asked what is below the sand. Again, it depends. Maybe another type of sedimentary rock. Eventually, though, if you could keep digging you would hit a "basement" consisting of igneous and/or metamorphic rocks. This true no matter what continent you happen to be on, though the depth you would have to dig to varies. One number that I can pin down is that the total thickness of sedimentary rock for continental areas averages 1800 meters, with extremes from 0 to 20 000 meters (4). To put that in context, Earth has a radius of 6378 kilometers (5). Like the skin on an apple, the sands of the world, combined with all the other sedimentary rocks, on average only go down about 0.028% of the distance to the Earth's center, with a maximum of 0.31%
(1) Geology of the Grand Canyon area. http: //en.wikipedia.org/wiki/Geology_of_the_Grand_Canyon_area
(2) Geology of the Zion and Kolob Canyons area http://en.wikipedia.org/wiki/Geology_of_the_Zion_and_Kolob_canyons _area#Na vajo_Formation_.28Lower_to_Mid_Jurassic.29
(3) Michael Brookfield and references therein, in Facies Models, Roger Walker and Noel James, eds. Geoscience Canada. 1992. pp. 143- 144.
(4) Harvey Blatt and Robert Tracy, Petrology Second Edition. p. 221.
(5) http://s cienceworld.wolfram.com/astronomy/EarthRadius.html
Try the links in the MadSci Library for more information on Earth Sciences.