It is important to calculate profit for every business. Here is how to calculate margin in MySQL.
MySQL Query To Get Top Selling Products
It is important to get top selling products for every ecommerce business. Here is the MySQL query to get top selling products.
Multiple Counts with Different Conditions in single MySQL query
It is easy to get multiple counts with multiple conditions in MySQL. Here is how to get multiple counts with different criteria in MySQL.
How to Use CASE Statement in MySQL
Case statements help you use multiple if conditions in SQL queries. Here is how to write case statement in MySQL.
How to Check if PostgreSQL Array Contains Value
Sometimes you may need to check if value exists in array. Here is how to check if PostgreSQL array contains value.
How to Use Coalesce in MySQL
Coalesce is a useful MySQL function that returns first non-null value. Here is how to use Coalesce in MySQL.
How to Query JSON column in MySQL
Sometimes you may need to search JSON array of objects, extract JSON data or retrieve JSON data in MySQL. In this article, we will look at how to query JSON column in MySQL.
How To Avoid Inserting Duplicate Records in MySQL
Sometimes you may need to prevent duplicate insert while adding rows. Here is how to avoid inserting duplicate records in MySQL.
How to Update Array in PostgreSQL
Sometimes you may need to update array in PostgreSQL with new data. In this article, we will look at how to change array in PostgreSQL, modify array in PostgreSQL, and merge arrays in PostgreSQL.
How to Get Multiple Counts With Single Query in MySQL
Sometimes you may need to select multiple count in one query or get multiple counts for different criteria. Here is how to get multiple counts with single query in MySQL.