LeetCode 2205 'Number of Users Eligible for Discount' Interview SQL Question Detailed Explanation

preview_player
Показать описание

In this video I solve and explain a leetcode SQL question using MySQL query. This question has been asked in Apple, Facebook, Amazon, Google, Adobe, Microsoft, Adobe interviews or what we popularly call FAANG interviews.
I explain the related concept as well. This question includes points to keep in mind to develop SQL queries.

LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.

If you found this helpful, Like and Subscribe to the channel for more content.

#LeetCodeSQL #FAANG #SQLinterviewQuestions
Рекомендации по теме
Комментарии
Автор

Why can't we simple use

SELECT COUNT(*) AS user_cnt
FROM (SELECT *
FROM purchases
WHERE
time_stamp BETWEEN '2022-03-08 00:00:00' AND '2022-03-20 00:00:00'
AND
amount >= 1000) AS finaltable

sashankkanagala
Автор

how did we comapred data and timestamp dataypes without any casting?

mickyman
Автор

Why if I use date_format(start_date, "%Y-%m-%d") to convert to year, month, day, it does not pass the test case?

Abby-tsul
welcome to shbcf.ru