The MaxCompute console provides a query editor for you to execute SQL statements and analyze data. This topic describes how to use the query editor.


The query editor of MaxCompute is integrated into the DataAnalysis tool of DataWorks. You can use the query editor to edit MaxCompute SQL statements, query data, analyze data in workbooks, share data online, and download data. You can use the query editor to perform the following operations:
  • Edit and execute SQL statements and authorization commands, such as access control list (ACL)-based authorization commands.
  • Enable the MaxCompute Query Acceleration (MCQA) feature. After this feature is enabled, the time that is used to run small- and medium-sized query jobs is reduced from minutes to seconds. For more information about MCQA, see MCQA overview.
  • Use and test MaxCompute based on its public datasets. By default, the public datasets are open to users.
  • Analyze, download, and share query results by using Web Excel online.


The query editor can be used in the following scenarios:
  • If you use and test MaxCompute for the first time, you can use the query editor to experience the core features of MaxCompute based on the public datasets.
  • If you are a data analyst, you can use the query editor to query data. Then, you can switch to the analysis mode to analyze the query results by using Web Excel online. To reduce the frequency at which data is transferred and ensure data security, you can also download the query results to your computer for analysis.
  • If you are a security administrator, you can find a required project and click Project permission management in the Actions column to manage role permissions. However, this feature is in trial use. In many scenarios, you must run commands to manage permissions. The query editor allows you to run most of the security commands without the need to perform additional configurations.

Open the query editor

  1. Log on to the MaxCompute console, select a region in the top navigation bar, and then click Query editing to open the query editor. Query editing
  2. In the Select Datasource dialog box, select MaxCompute for Type and select an existing project from the Workspace drop-down list. Select a project
    Note If you select a project that is associated with a workspace in standard mode and submit a job by using the query editor, the job is submitted in a development project. The name of such a project is ended with _dev.
  3. Click OK. The SQL Query page appears.

Query mode and analysis mode

The query editor can work in query mode or analysis mode. This feature is integrated into the DataAnalysis tool of DataWorks. For more information, see DataAnalysis. The components displayed in query mode are different from those displayed in analysis mode.
  • Query modeQuery mode
    No. Description
    The name of the workspace.
    Tables in the workspace, tables that have been used, and public datasets.
    The editor, which allows you to execute SQL statements and run authorization commands, such as ACL-based authorization commands. On the SQL Query page, you can edit a script without the need to create a file. You can also save the script as a file.
    The tabs that allow you to view the saved query files, history, logs, and results.
  • Analysis mode

    After you execute SQL statements in query mode, you can click Analyze in Spreadsheet in the lower-right corner of the page to enter the analysis mode.

    Analysis mode
    No. Description
    The toolbar that you use to edit and manage data in a workbook.
    The query results.