Count Salary Categories | Leetcode 1907 | Crack SQL Interviews in 50 Qs

  Рет қаралды 3,205

Learn With Chirag

Learn With Chirag

Күн бұрын

Пікірлер: 9
@learnwithchirag
@learnwithchirag 10 ай бұрын
Hey there! 👋 For more interesting content, tutorials, and updates, Feel free to connect with me on Instagram Handles :- @createwithchirag - instagram.com/createwithchirag/ @learn.with.chirag - instagram.com/learn.with.chirag/ LinkedIn: www.linkedin.com/in/chirag-sehgal-9200111b8/ Let's stay connected and keep the creativity flowing! 💡
@dikshaaggarwal1340
@dikshaaggarwal1340 9 ай бұрын
Hi, Can we solve this query by CASE statements?
@rahulkumar-sk9sj
@rahulkumar-sk9sj 4 ай бұрын
select case when income < 20000 then "Low Salary" when income between 20000 and 50000 then "Average Salary" when income > 50000 then "High Salary" end as category,count(*) as accounts_count from Accounts group by category; but the problem is how to put 0 for average salary. please reply sir
@amanjha5422
@amanjha5422 11 ай бұрын
hello bhaiya i have a doubt in this query by writing "low salary "as category or "high salary" as category kya ye kuch bhi ese likhne se table ke andr new values likh sakte h kya ?? or ye esa kya hua bcz hme to table me low salary ya high salary jesa kuch diya hi nhi h ??
@learnwithchirag
@learnwithchirag 11 ай бұрын
In SQL, when you use string literals like "Low Salary", "Average Salary", or "High Salary" in the SELECT statement, you're essentially creating new values or aliases for the corresponding columns in the result set. These values are not stored in the table itself; they are dynamically generated during the execution of the query to represent certain categories or labels. In the given query, the string literals "Low Salary", "Average Salary", and "High Salary" are used as aliases for the category column in each SELECT statement. These aliases are then combined with the corresponding count of accounts meeting the specified income criteria using the UNION operator.
@amanjha5422
@amanjha5422 11 ай бұрын
@@learnwithchirag thanks bhaiya from your videos i have completed all the questions. But I have an query for the very first time I have watched almost your videos so should I do this series of questions 2-3 times for my interview preparation as I am preparing for data engineering and suggest me some tips for SQL preparation bcz i just want to do learn advanced SQL and abhi mujh se join or subqueries vale part me dikkat ati h kon se question me kya use kru nhi smjh me ata h ...🙂
@learnwithchirag
@learnwithchirag 11 ай бұрын
@@amanjha5422 yes ofcourse you can revise these questions. For revison I have combined all 50 questions and have made a 5 hour long video on my channel. So that it becomes easy for someone who wants to revise in one shot ! And for advance topics like Window Functions and Common Table Expressions , you can refer online documentation and multiple videos are there on youtube. Also don't restrict your self to just one role like data engineer. Learn As many tech stacks as you can ! now a days jobs are limited. Practice hard , make projects , read documentation and Keep Learning 💯
@satyamchauhan9775
@satyamchauhan9775 4 ай бұрын
bhai agar solutin hi dekhna hota to chat gpt kar leta main
@learnwithchirag
@learnwithchirag 4 ай бұрын
@@satyamchauhan9775 nhi bhai explanation bhi mil jati h udhr, vaise toh video ki need hi nhi honi chahiye SQL meh I think.....just logon neh request kri toh jitna aata tha bana diya...
LeetCode 1907: Count Salary Categories [SQL]
9:42
Frederik Müller
Рет қаралды 801
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
36. Count Salary Categories | SQL Interview Questions and Answers
7:17
Start Practicing
Рет қаралды 1,7 М.
40. Restaurant Growth | SQL Interview Questions and Answers
13:12
Start Practicing
Рет қаралды 2,4 М.
Learn 12 Basic SQL Concepts in 15 Minutes (project files included!)
16:48