To properly respond to this question, it is important to realize that sandstone is a type of sedimentary rock.
Sedimentary rock is composed of a variety of materials which include pieces of rock, fossils, or minerals which have been cemented together. Sandstone is an example of a type of clastic sedimentary rock where sand particle sizes can range from 1/16 to 2 mm in diameter. It would be expected that sandstone particle size, structures, and composition will depend upon the sedimentary dynamic within the setting in which it is formed. Some of the variables that play a role in this dynamic involve the forces which promote the mixing of sandstone components, the mineral composition, temperature, pH, presence or absence of fossilized material, etc. All of these factors need to be taken into consideration when one characterizes the type of sandstone that one is dealing with distinguishing beach from desert sandstone. Keep in mind that there will be many varieties of beach as well as desert sandstone. Thus, one needs to carefully analyze the specific sedimentary dynamic associated with each type sandstone when making any type of comparisons.