Visualize SQL query results with charts in Azure Data Studio

Azure Data Studio is Microsofts cross-platform (it works on MacOS and Linux unlike SSMS) database IDE. Despite it’s name you can connect to on-premise DBs too just like SSMS.

Microsofts What is Azure Data Studio page┬áhas a good overview of the different functionality available in ADS and also outlines why you might choose ADS over SSMS but here I’m just going to show some quick examples of the charting capabilities available. These give you a nice simple way to visualize data direct in the IDE.

The query I’m using┬áreturns two columns relating to the amount of sales by location in the AdventureWorksLT sample database.

Simple Query in Azure Data Studio

Clicking the chart icon on the RHS gives us a number of options for charting the results as seen below. The specific options available depend on what type of chart you select.

There are ten chart types supported, but not all will be relevant to all result sets. You get more power in excel or dedicated charting solutions but if your query is simple the charting in ADS can be very helpful. I find myself using it a lot in combination with group by statements.

A few examples of charts based on the above sales location data are below. In order, the charts are Bar, Doughnut, Line and Horizontal Bar.

Leave a Reply

Your email address will not be published.