--- title: "Execute Query" url: https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/zcql/execute-zcql-query/ description: "This page describes the method to execute ZCQL queries on a table in the Data Store in your NodeJS application with sample code snippets." last_updated: 2026-09-08T11:07:33Z service: Cloud Scale type: general related_links: - name: "Execute query - API" url: /en/api/code-reference/cloud-scale/zcql/execute-zcql-query/#ExecuteZCQLQuery - name: "ZCQL" url: /en/cloud-scale/help/zcql/introduction - name: "Data Store" url: /en/cloud-scale/help/data-store/introduction --- # Execute Query > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/cloudscale/datastore/query-datastore/) now. `zcql` refers to the component instance defined [here](https://docs.catalyst.zoho.com/en/sdk/nodejs/v2/cloud-scale/zcql/get-component-instance). This will return a promise which will be resolved to an object. The `content` key will contain the array of row objects. ### Construct and Execute the Query on the Primary Data Store For the [ZCQL queries](https://docs.catalyst.zoho.com/en/cloud-scale/help/zcql/introduction) to be executed on the primary Data Store, you can construct the query and pass it to the `executeZCQLQuery()` method as shown below. These queries can include SELECT, INSERT, UPDATE, or DELETE statements. A sample INSERT query is shown below: ```javascript //Construct the query to execute let query = 'INSERT into ShipmentData (productID, productName, region) VALUES (3782, A4 Reams, India)'; let result = await zcql.executeZCQLQuery(query); ``` ### Construct and Execute the Query on the OLAP Database The queries that you execute on the OLAP database must only include the SELECT statement, as direct write operations on it are not allowed. You can construct the query object and pass it to the `executeOLAPQuery()` method. A sample analytical SELECT query is shown below. ```javascript //Construct the query to execute let query = 'SELECT SUM(price) FROM ShipmentData'; let result = await zcql.executeOLAPQuery(query); ```