Use of Max, Case, Between in MySQL Query By Example

preview_player
Показать описание
Output the impressions and clicks on new columns based on the date for 1st October 2021 and 2nd October 2021

🎯APPROACH -
▶we want impressions and clicks only for dates 1st and 2nd October, filtering records using 'WHERE' CLAUSE
▶ Now, to fetch values for impressions and clicks,
use two case statements for both impressions and clicks separately.
▶ Using the max function in both the case statements as if we only apply case then it will also give null
So to avoid null values and fetching only the numbers using the max function.
▶ At the end, use group by date as we want impressions and click for both dates.

Song: Ehrling - You And Me (Vlog No Copyright Music)
Music provided by Vlog No Copyright Music.
Рекомендации по теме
Комментарии
Автор

Who is going to explain bro... Y u did this... When can one use this 😅😅😅😅????

rohitshaw