you need to review how data is created/stored in Cache documentation to get a better understanding of the options available
you can't retrieve data directly from a Caché global using an SQL statement.
globals like ^MACK are hierarchical tables that store data in a non-relational format.
globals can be mapped to a table name to allow for SQL access, but this requires someone with Cache experience to do this.
classes/objects such as NAMESPACE.TABLENAME store data in a relational format & you can retrieve data from these via SQL.
Globals are an older data structure that is mainly used in legacy Cache systems.
classes/objects are used in more modern systems that require SQL/.NET/JAVA/etc access.
if you are creating a new database from scratch, use classes/objects to store your data.
if you are accessing an existing database with globals you may need to consider mapping or converting data to classes.
hope this helps!