This article demonstrates, how to query OLAP cubes in Microsoft SQL Server Analysis Services (SSAS) using an ODBC connection. Although, the code examples are provided in PHP, this method should work with any other programming language. In PHP, the same can be done via the sqlsrv extension. In a nutshell, we are going to tunnel MDX queries through SQL via OPENQUERY() or OPENROWSET() functions.