@Shambhu Rai - Thanks for the question and using MS Q&A platform.
Unfortunately, you cannot run SQL Queries using Compute clusters.
Note: SQL warehouses are used to run Databricks SQL workloads, such as queries, dashboards, and visualizations.
Here is the difference between SQL warehouses vs Clusters in Azure Databricks:
SQL warehouses are used to run Databricks SQL workloads, such as queries, dashboards, and visualizations. SQL warehouses allow you to access Unity Catalog data and run Unity Catalog-specific commands by default, as long as your workspace is attached to a Unity Catalog metastore.
Clusters are used to run workloads in the Data Science & Engineering and Databricks Machine Learning persona-based environments, using notebooks or automated jobs. To create a cluster that can access Unity Catalog, the workspace you are creating the cluster in must be attached to a Unity Catalog metastore and must use a Unity-Catalog-capable access mode (shared or single user).
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.