automated email notification when their disk space is lower than a specified threshold

How to send an email alert from MS SQL Server Instance when a given disk space is lower than a specified threshold

Several days ago, we received a request from one of our clients asking if we can set an automated email notification when their disk space is lower than a specified threshold. We learned that they run into an issue when one of their disks on the SQL Server were almost full and their nightly process...Continue reading

adds results into subtotals and grand totals

How to use GROUPING SETS in ‘Group By’ aggregate function in SQL Server Instance

“GROUPING SETS” creates a group for each combination and adds results into subtotals and grand totals and displays only those calculations. It might actually be more convenient mostly to execute two different queries instead of GROUPING SETS because then one can have the grouped results separate from the totals. But GROUPING SETS will more efficient...Continue reading

Data Update Time

How to solve “Unknown Update time” error after adding a time of the last data refresh (a time stamp) to a view in a Tableau dashboard

In Tableau Desktop you can add last data refresh time / Update time (a time stamp) to the top of the view with following the below steps: Open your workbook and navigate to the sheet for which you would like to display the time of the last data refresh. Select Worksheet > Show Title. Double-click the title. In...Continue reading

select Second Nth highest value

11 different ways to select Second / Nth highest value in MS SQL Server Instance

Let’s discuss 11 different ways to select second highest value in MS SQL table. And as a bonus, 6 different ways to select the Nth highest value. I will be using a table called WorkOrder with three columns in it; WorkOrderID, ProductID, OrderQty. Here is a quick look to our table: WorkOrderID   ProductID   OrderQty 1   ...

ROLLUP in ‘Group By’ aggregate function

How to use ROLLUP in ‘Group By’ aggregate function in SQL Server Instance

The SQL Server GROUP BY ROLLUP is an extension of the GROUP BY clause that creates a group for each combination and adds results into sub-totals and grand totals. ROLLUP does not create all possible grouping sets based on the dimension columns. When generating the grouping sets, ROLLUP assumes a hierarchy among the dimension columns...Continue reading

Scroll to top