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! 💡
@dikshaaggarwal13409 ай бұрын
Hi, Can we solve this query by CASE statements?
@rahulkumar-sk9sj4 ай бұрын
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
@amanjha542211 ай бұрын
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 ??
@learnwithchirag11 ай бұрын
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.
@amanjha542211 ай бұрын
@@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 ...🙂
@learnwithchirag11 ай бұрын
@@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 💯
@satyamchauhan97754 ай бұрын
bhai agar solutin hi dekhna hota to chat gpt kar leta main
@learnwithchirag4 ай бұрын
@@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...