Database

Select from multiple tables MySQL

This article will be looking into queries to select from multiple tables through different ways for different requirements. Table of Contents Select from multiple tables MySQL using JOINS Select from multiple tables MySQL using UNIONS Select from multiple tables MySQL using Subqueries Select from multiple tables MySQL with IN() Before moving into each section, let […]

Select from multiple tables MySQL Read More »

How to get multiple counts in single MySQL query

This article will be taking an example table customer_data and will try to get multiple counts from this table within a single query. Topics covered: COUNT(*) GROUP BY COUNT(DISTINCT) BASED ON CONDITION Let us get started by creating the table customer_data and inserting the data into it. We will see how the data looks by executing SELECT * FROM

How to get multiple counts in single MySQL query Read More »

Scroll to Top