Onyx is a variety of Agate
In correct usage, the name refers to a black and white banded variety of Agate, or sometimes a monochromatic agate with dark and light bands (brown and white for example) - but traditionally the name was reserved for black and white banded agate, and brown varieties named Sardonyx.
In recent times the name has become confused with other banded materials, in particular banded calcite formed in cave systems such as the material found in Mexico and Pakistan and often carved, in fact the majority of carved material (such as book-ends, chess-sets, etc) that are available today are made from this carbonate rock. This is a carbonate material and is not true Onyx. Other names have been used over time for this material, such as "Mexican Onyx" and "onyx-marble". Careless use of these names has resulted in the term 'Onyx' being incorrectly applied to a variety of banded materials that are not covered by the original definition of the name. [mindat.com]