9 Best Practices for Writing SQL Queries

If you are reading this article, most probably, you are already familiar with SQL. You know how to write basic SQL queries. There are many ways to execute a SQL query to get desired results on your database.

However, not all SQL queries are created equal. Most can be optimized to follow the best practice. This article focuses on 9 SQL query optimization tips. After reading, you will know all the dos and don’ts of writing SQL queries.

CodingSight - 9 Best Practices for Writing SQL Queries
Read More

How CTE Can Aid In Writing Complex, Powerful Queries: A Performance Perspective

We often see poorly written complex SQL queries running against a table or tables in databases. Those queries make the time of execution very long and cause consuming huge CPU and other resources. Still, complex queries provide valuable information to the application/person running them in many cases. Therefore, they are useful assets in all varieties of applications.

Read More

The Easy Guide on How to Use Subqueries in SQL Server

Do you use SQL subqueries or avoid using them?

Let’s say the chief credit and collections officer asks you to list down the names of people, their unpaid balances per month, and the current running balance and wants you to import this data array into Excel. The purpose is to analyze the data and come up with an offer making payments lighter to mitigate the effects of the COVID19 pandemic.

Do you opt to use a query and a nested subquery or a join? What decision will you make?

Read More