Scenario

A CompositeProvider has been defined. In the next step in our scenario, we define a Query on the CompositeProvider.

Finally, we consume the Query in SAP Analysis for Microsoft Office to analyze the results. An SAP Analysis for Microsoft Office workbook can be used to present the results from one or more Queries. It offers the possibility to analyze the data such as changing the layout (row, columns), adding filters, sorting data, and creating additional calculations.
InfoProviders

A Query always needs to be defined on an InfoProvider.
What are InfoProviders?

An InfoProvider is an object for which Queries can be created and run.
InfoProviders can store persistent data, or they just virtually collect data from other InfoProviders.
The definition correctly infers that an InfoProvider can be either physical storage of data in real database tables, or a virtual collection of data (such as a view) that only collects data temporarily to feed it to a Query, but does not permanently store it.
During the course, we have already covered many SAP BW/4HANA objects, which can be used as InfoProvider for Queries.
In a previous unit, data flows were described to load master data for master data bearing InfoObjects. If you set the property Usable as InfoProvider in the InfoObject definition, you can use these InfoObjects as InfoProviders. This gives you the possibility to create a Query on them for master data reports.
In a previous unit, we focused on the DataStore Object (advanced), which is primarily used to store transactional data and we have also explained the Open ODS View, which offers a view on source data, without the need to create InfoObjects and loading data upfront.
And in this unit, we have just explained the CompositeProvider, which is the object in SAP BW/4HANA presenting the virtualization layer. Creating a Query on top of a CompositeProvider offers advantages (flexibility, maintenance, navigational attributes) compared to the creation of the Query on top of a DataStore Object (advanced).
Queries

You define a Query in order to generate a result set from SAP BW/4HANA.
In the definition of a Query you can choose which data should be available from the InfoProvider by selecting the InfoObjects and optionally applying filters to them.
You also define the initial layout of the report (rows, columns, totals).
In a Query you can also define additional calculations, for example the number of different products sold to business partners. Queries use the Analytic Engine offered in SAP BW/4HANA to process these kind of calculations.
Note
If you want to learn more details about Queries, the course BW405 has a primary focus on the possibilities with Queries and the use of the Analytic Engine.
In SAP BW/4HANA, master data is stored in separate tables. However, when a Query is run, the Analytic Engine in SAP BW/4HANA automatically enriches transactional data with master data. On the picture above, the transactional data, revenue per customer, is enriched with the name of the customer (text) and two attributes (country and discount).

A Query is the final layer in the data flow and can be consumed by different tools, either by SAP Analytics or non-SAP solutions (via oData, SQL, or MDX).
SAP Analytics offers:
SAP Business Objects BI:
SAP BusinessObjects Web Intelligence: allows business users to easily analyze and visualize data in order to make informed decisions based on up-to-date information
SAP Crystal Reports: easy to consume, highly formatted pixel perfect reports
SAP Lumira Designer: for professional analysis application designers to create corporate analysis applications and reports based on multiple data sources
SAP Analysis for Microsoft Office: designed for analysts who require analytical capabilities in Microsoft Excel.
SAP Analytics Cloud: SAP’s strategic analytics and planning offering, allowing customers to analyze their data in context and to make better and faster decisions.
Note
You can review the main features and scenarios of SAP Analytics Cloud here: SAP Analytics Cloud | Features and Capabilities