Using LIMIT within GROUP BY to get N results per group?

In this Post, Using LIMIT within GROUP BY to get N results per group whereas in MySQL limit is used for filtering or restricting the data to display where we can limit the data as per our choice where we can restrict the number of rows given by a query more over we can use … Read more

JOIN | How can I do a FULL OUTER JOIN in MySQL?

In this post, we will learn How can I do a FULL OUTER JOIN in MySQL where joins are being used for filtering the data or making some restrictions over the data which helps in restricting the data during the display of the data from two different tables in case of Relational database management System( … Read more

How To Create A MySQL Hierarchical Recursive Query?

In this tutorial, we will learn How to create a MySQL hierarchical recursive query which is also called as CTE ( Common Table Expressions) moreover for achieving it we can also use CTE and UNION All statements for a recursive query that has a self-referencing foreign key relationship.   Hierarchical Recursive Moreover, we have given … Read more

How to Retrieve The Last Record in Each Group – MySQL

In this post, we will learn about Retrieve the last record in each group in MySQL which we can perform using the group by clause and max function The basic idea is to group the records by a certain attribute and then find the maximum values which could be from the primary key( where we … Read more

How can I return pivot table output in MySQL?

In this tutorial, we will learn How can I return Pivot table output in MySQL although we do not have a pivot function in MySQL as some other database has we can always achieve the same using some other method which could be the same as of pivot function using aggregate function and conditional function. … Read more

How to Select Only Rows With Max Value On A Column in SQL?

In this post, we will learn how to SQL select only rows with max value on a column which we can perform using two different methods, Using subquery and self- join, Which we will discuss here one by one with examples of code( Commands). Different Ways to Get Max Values There are different ways to … Read more

When to Use Single Quotes, Double Quotes, and Backticks in MySQL

In this post, we will get to know When to use single quotes , double quotes, and backticks in MySQL there are these three types of quotes in MySQL that we use for enclosing the strings at different parts of the time when we need here we will learn the different uses of each quote … Read more

Which MySQL Data Type To Use For Storing Boolean Values?

In this tutorial, we will find Which MySQL Data Type To Use For Storing Boolean Values MySQL does not have any such kind of data type as Boolean but we make int as TINYINT to store only two values that are zero or one where zero means false and one means true. DataTypes In MySQL … Read more

Database | How Do I quickly Rename A MySQL Database?

Here we will know How Do I quickly Rename A MySQL Database where we know we can not rename the existing database but we can put the whole data in the new database and we can put the name of the new database as per our choice, Which indirectly renaming the database. Steps To Rename … Read more

Insert Into A MySQL Table Or Update If Exists

In this tutorial we will learn Insert Into A MySQL Table Or Update If Exists there is a command to insert the data in a table that is insert into table and to update the table we use update command to update it. Insert A New Record In to Table Insert is a command which … Read more

%d bloggers like this: