SQL Interview Questions: Real-Time Scenarios & Aggregate Function Tips

Поделиться
HTML-код
  • Опубликовано: 6 фев 2025
  • Welcome to "SQL Interview Questions: Real-Time Scenarios & Aggregate Function Tips"! 🚀 In this video, we'll explore essential SQL interview questions focusing on real-time scenarios and tips for mastering aggregate functions. Whether you're a seasoned pro or just getting started, these insights will elevate your SQL interview game. 🔍💼
    Question List:
    1.Calculate the total number of employees?
    2.Calculate the average salary of all employees?
    3.Find the highest salary among all employees?
    4.Find the lowest salary among all employees?
    5.Calculate the total salary expense for the company?
    6.Count the number of employees in each department?
    7.Find the average salary in each department?
    8.Calculate the total salary expense for each job title?
    9.Find the department with the highest average salary?
    10.Calculate the average salary for managers and non-managers?
    11.Find departments with an average salary greater than $60,000?
    12.Can we use the WHERE clause along with GROUP BY?
    13.Can we use HAVING and WHERE clause in one query?
    🌟 Don't forget to hit the subscribe button for more tech insights! Channel: Tech and Talk. Happy learning! 💻🔗
    SQL Interview, Aggregate Functions, Real Scenarios, Interview Tips, SQL Tips, SQL Queries, SQL Practice, Database Management, Data Analysis, Tech Interview, SQL WHERE Clause, SQL HAVING Clause, Salary Calculation, Employee Data, Career Advancement.
    #SQLInterview #AggregateFunctions #TechTalk #SQLTips #CareerAdvice #TechInsights #DatabaseManagement #InterviewPrep #DataAnalysis #SQLQueries #SQLPractices #TechLearning #CareerSuccess #SQLTutorial #TechCommunity
    Create Table and Insert Data Scripts:
    drive.google.c...
    Subscribe Here:
    youtube.com/@T...

Комментарии • 28

  • @TechAndTalkConnect
    @TechAndTalkConnect  Год назад +1

    Google Drive link for Scripts: drive.google.com/file/d/1Gm0qeSIqui5CK4RC0i89hRsNehSlqIhN/view?usp=drive_link

  • @M.kesavanM.kesavan-vt5md
    @M.kesavanM.kesavan-vt5md 4 месяца назад +1

    Broo if there is each keyword
    We also use inner join
    Yes or No broo

  • @insidehead
    @insidehead Год назад +2

    QUERY FOR Q 10:
    SELECT 'non_mgr' as avg_sal ,AVG (Salary) avg_sal
    FROM Employees
    WHERE EmployeeID NOT IN (SELECT ManagerID FROM Employees WHERE ManagerID IS NOT NULL)
    UNION all
    SELECT 'mgr' as avg_sal ,AVG (Salary) avg_sal
    FROM Employees
    WHERE EmployeeID IN (SELECT ManagerID FROM Employees WHERE ManagerID IS NOT NULL)

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      Thank you for sharing your query! It's great to see different perspectives. Your approach is valid, and it's interesting to explore SQL scenarios from various angles. Appreciate your contribution to the discussion! Happy coding

  • @sooraj_sp_11
    @sooraj_sp_11 Год назад +2

    Thanks for the video ❤
    It boosts my confidence

  • @aishwaryapattnaik3082
    @aishwaryapattnaik3082 Год назад +1

    Could you include additional SQL interview questions tailored for experienced professionals? It would be much appreciated if you could also share the DDL scripts. It's a fantastic way to enhance SQL skills!

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад +2

      Thanks for the feedback! Great suggestion! I'll be adding more advanced SQL questions in future videos. Stay tuned for the link in the video description. Let me know if there's anything specific you'd like to see! Google Drive link: drive.google.com/file/d/1Gm0qeSIqui5CK4RC0i89hRsNehSlqIhN/view?usp=drive_link. Happy coding! keep Practicing!🚀

  • @1sunilento
    @1sunilento Год назад +4

    Good video. However, for question no. 10, finding a non-manger is tricky.. John Doe is the ultimate manager but other employees are also managers of lower-level employees. I don't think we can group all others except John Doe as non-managers. Please clarify!

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад +3

      Thank you for your comment! You've brought up a valid consideration. In the scenario discussed, we treated the question by categorizing employees as 'Manager' if they are part of the managerial hierarchy, including both parent managers and those directly managing others. It's a simplified approach, and I acknowledge that the ultimate manager, like John Doe, can have a unique role. If you have further insights or questions, feel free to share! Your feedback is valuable.

    • @shivamthakur674
      @shivamthakur674 8 месяцев назад

      Also the keyword should be used is not null then manager else non-manager

  • @sakshinaik05
    @sakshinaik05 Год назад +1

    Thank you for the video bring more such videos

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад +1

      More to come!You're welcome! I'm thrilled you enjoyed the video. More similar content is on the way. Stay tuned for upcoming videos!

  • @NGKannur
    @NGKannur 9 месяцев назад +1

    Thanks bro👍🏻

  • @sagargudla1362
    @sagargudla1362 Год назад +1

    Thank you bhava

  • @codedtech75
    @codedtech75 Год назад +1

    Amazing video sir,👌

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      Thank you for watching and expressing your appreciation 😊

  • @ushasworld5223
    @ushasworld5223 Год назад +1

    Could u please make a video of data analyst portfolio by taking real world data so that we can put that in our resumed please.....

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      Thanks for the input! Exploring the idea of a data analyst portfolio video. If you have specific areas in mind or topics you'd like covered, feel free to drop your suggestions. Your feedback is key

  • @sumitchaudhari5815
    @sumitchaudhari5815 Год назад

    i have a question:- suppose i have to fetch data in my db like mysql daily at fixed time suppose at morning 7 am what kind of query should i write so it can fetch data at that time automatically i think i need to use even schedule but how to schedule it for that specific time. is it possible to do that

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      please refer the post for this question.
      I have explained in details what steps you should have to refer for Schedule.

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      @@sumitchaudhari5815 Please refer the community post URL ruclips.net/channel/UCrhNezSLNCAojblfC0MSihgcommunity?pvf=CAE%253D

  • @insidehead
    @insidehead Год назад +1

    Anything for 2 3 yr exp.

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      Thank you for your comment! For specific tips on interviews with 2 to 3 years of experience, you might find valuable insights in my dedicated interview playlist: [Interview Playlist](ruclips.net/p/PLFXSOrOKP0AreAxv3CJksu2f6_rI3LACl&si=M4246tn-h_uTSIKA). Feel free to check it out, and if you have any more questions, don't hesitate to ask!

  • @insidehead
    @insidehead Год назад +1

    10.Calculate the average salary for managers and non-managers?
    THERE IS NOT ONLY ONE MANAGER, EVERY EMPLOYYE HAS A MANAGER FIRST WE HAVE TO INNER JOIN THEN TAKE AVG SALARY I THINK. .. BUT U TOOK ONLY FOR ONE MANAGER WHY?
    I THINK ITS WRONG QUERY.

    • @TechAndTalkConnect
      @TechAndTalkConnect  Год назад

      Thanks for pointing that out! Your observation is spot-on. When I crafted this question, my intent was to identify the 'ultimate manager' (like John Doe) and treat others as managers of lower-level employees- so it won't be the ultimate manager so we are considered as Non manager.
      It's more about the hierarchy in management. I appreciate your perspective, and your understanding aligns with a different interpretation, considering them as non-managers. SQL scenarios can indeed have various valid interpretations. If you have more insights or if there's anything specific you'd like to explore, feel free to share. Happy coding!