Top 15 SQL Queries Interview Questions and Answers for Software Testing professionals || Part-B

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024
  • Here is the link for SQL Query IQs PART-A ► • Top 15 SQL Interview Q...
    Here you will learn Top 15 SQL Queries interview questions and answers asked to software testers.
    16. Write a query to fetch all data from Employee table ?
    17. Write a Query to fetch details of male employees?
    18. Write a Query to find Max Salary from each department ?
    19. Write a Query to print the name of distinct employee whose Salary is between 30000 to 35000 ?
    20. Write a Query to find employee whose Salary is equal or greater than 40000 ?
    21. Write a Query to find name of employee whose name Start with ‘S’ ?
    22. Write a Query to find maximum salary for a lady employee?
    23. Write a Query to get nth(3rd) Highest Salary?
    24. Write a Query to get nth(3rd) Lowest Salary?
    25. Write a Query to Insert a new employee details ?
    26. Write a Query to update salary of an employee Yashika to 34000.
    27. Write a Query to Delete details of employee named as Deepak ?
    28. Write a Query to fetch all details from both Employee and Company table ?
    29. Write a Query to fetch company name of the lady employee who is getting highest salary?
    30. Write a Query to Create a table and drop same table ?
    Additional Info
    Link for SDET/QA Interview Full Play List ► bit.ly/3frBpQZ
    Link for API Testing Full Play List ► bit.ly/2BY0vHu
    Link for Cypress Tutorial Full Play List ► bit.ly/3iMdi2a
    Link for Web-services Full Play List ► bit.ly/3bfK0Ef
    Link for Protractor Testing Full Play List ► bit.ly/2ztlEIK
    Link for Java Programs for Software Testers Full Play List ► bit.ly/2ZGeBFC
    Link for Java Tutorial Full Play List ► bit.ly/2Z3tP8L
    Link for Selenium Tutorial Full Play List ► bit.ly/3vFR9X5
    Link for TestNG Full Play List ► bit.ly/3jGJ3YT
    Please subscribe to our channel ► bit.ly/2UIvFcm
    and press the bell icon to get updates on latest tutorial.
    #softwaretestingandautomation #subhasishmishra #softwaretesting #selenium #apitesting #java #restassuredapiautomation #testng #sql #unix #automationtesting #softwaretestinginterviewquestionandanswers #testautomation

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

  • @pratikpoojari1212
    @pratikpoojari1212 2 года назад +7

    Doubt in 19th question - Distinct for Firstname is incorrect I believe. The question was to display all the employees having salary btw 30 and 35 so both 'Yashika' were supposed to get displayed as one of them has 32 and other one has 34 salary.

  • @k9870
    @k9870 2 года назад +4

    Hey subhashish,I completed your java programming questions series & now doing SQL for a quick recap..from your java programming series I am getting most of the questions in interview...thanks for it... subscribed,,,😊

    • @SoftwareTestingAndAutomation
      @SoftwareTestingAndAutomation  2 года назад +1

      I am glad to hear that 😊 share it with your friends.

    • @omthakurgulshan534
      @omthakurgulshan534 2 года назад

      I can't found​ java programming question answer . Please help

    • @k9870
      @k9870 2 года назад

      @@omthakurgulshan534 Check in his playlist section,total 32 java programming questions are there

  • @baan1221
    @baan1221 3 года назад +4

    Thank you so much for this video. This was the fastest recap on SQL commands and queries. very useful for QA interviews.

  • @705chacko
    @705chacko 3 года назад +1

    Watched both videos start to finish in one sitting. Very good job Subhasish Mishra.

  • @kunalmalpure7933
    @kunalmalpure7933 2 месяца назад

    Thank you so much i have learn from this lot . it will be very helpful for me for the interview.

  • @snowguo1786
    @snowguo1786 2 года назад +1

    Thank you, all the questions are clear! I am able to find my mistakes from your questions

  • @pritibarathe9193
    @pritibarathe9193 2 года назад +2

    Thank you so much... nicely explain all the queries... initially I find it very hard now it's seems to b easy...🙂👍

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

    Really superb bro Nth highest salary query is different approach thank you

  • @avinaashkr17
    @avinaashkr17 3 года назад +1

    Very Useful Video One Of The Best SQL Question Video In RUclips..
    Thanks A Lot.

  • @swapnilsawarkar3408
    @swapnilsawarkar3408 2 года назад +1

    Very helpful sir thanks.

  • @rohitpardeshi7084
    @rohitpardeshi7084 2 года назад +1

    Very informative video. Thank you.

  • @kavithareddy5572
    @kavithareddy5572 2 года назад +1

    Explained very clear 🙏

  • @harmeetheir6207
    @harmeetheir6207 2 года назад +1

    very helpfull thankyou.

  • @Abhishekrajducat
    @Abhishekrajducat 10 месяцев назад

    thanks sir cleared more concept

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

    This video was very useful..

  • @lkkota41
    @lkkota41 4 месяца назад

    thanks for your effort

  • @gaya353
    @gaya353 3 года назад +1

    Hi Subhasish, I had an interview yesterday and I was asked this question on SQL. Could u pls help me with the answer.
    Qn: How to delete duplicate records from a table?

    • @SoftwareTestingAndAutomation
      @SoftwareTestingAndAutomation  3 года назад +1

      Try this - DELETE FROM EMPLOYEE WHERE EMP_ID NOT IN(SELECT MAX(EMPID) AS MaxEmployeeID FROM EMPLOYEE GROUP BY FirstName, LastName, Country);

    • @divyakandy
      @divyakandy 3 года назад

      @@SoftwareTestingAndAutomation max (emp ID) returns maximum value of the Employee ID right, should we use the count(EMP ID)?

  • @vinaybijalgaonker4494
    @vinaybijalgaonker4494 2 года назад +1

    Good question

  • @sivaranjanis9019
    @sivaranjanis9019 2 года назад +1

    Great sir

  • @prathyusha704
    @prathyusha704 3 года назад +2

    Can you write this query 'Write a Query to fetch company name of the lady employee who is getting highest salary?' with out full join keyword like you told before inner join(31:52)

    • @SoftwareTestingAndAutomation
      @SoftwareTestingAndAutomation  3 года назад +1

      Try this, SELECT COMPANY_NAME FROM EMPLOYEE emp, COMPANY cmp where emp.EMP_ID=cmp.EMPLOYEE_ID and emp.SALARY in (SELECT MAX(SALARY) FROM EMPLOYEE where gender='Female');

  • @prajnadayalan535
    @prajnadayalan535 3 года назад +1

    Super make more videos🎉🎉🎉

  • @gitikagujrathi4853
    @gitikagujrathi4853 3 года назад +1

    There is two table one is employee table it will consists of emp_id, emp_name, emp_salary, and dept_id columns and another table consists of dept_number, dept_name to print emp_name, emp_salary, dept_name of an employee whose salary is maximum plz tell how to write query of this question.
    SIR PLZ TELL ME THE ANSWER .

    • @SoftwareTestingAndAutomation
      @SoftwareTestingAndAutomation  3 года назад

      First you need to join both the tables using a primary key then you can use the same query given in the video to find maximum salary. If you don't know which is the primary key you can ask it to the interviewer.
      Below example you can try:-
      SELECT a.employee_id, a.first_name, a.last_name, a.salary, b.department_name
      FROM employees a, departments b
      WHERE a.salary IN (SELECT MAX(salary) FROM employees) AND a.department_id=b.department_id ;

    • @gitikagujrathi4853
      @gitikagujrathi4853 3 года назад

      Ok thank you

  • @abhaygolhar7817
    @abhaygolhar7817 3 года назад

    Can we use dense_rank in 23rd question... Select * from(select employee. *, dense_rank over(order by salary desc) as highestsalary from employee) where highestsalary=3

  • @mr.perfect1205
    @mr.perfect1205 Год назад

    Plz add simple queries why you are making hard in nth max we can make use n-1 is enough

  • @butterfly7976
    @butterfly7976 3 года назад

    Very nice video

  • @ChandraSekhar-kl9ue
    @ChandraSekhar-kl9ue 3 года назад +1

    how for sql queries requires in testing plz explain

    • @SoftwareTestingAndAutomation
      @SoftwareTestingAndAutomation  3 года назад

      Testers should have good SQL knowledge to perform data base testing and it is basic skill for QA.

  • @akashsonawane650
    @akashsonawane650 3 года назад +1

    can you give a 2 high salary from each group

    • @SoftwareTestingAndAutomation
      @SoftwareTestingAndAutomation  3 года назад

      Try this - Select Department,Max(Salary)
      From (Select E1.Department,E1.Salary
      From Employee E1,(Select Department,Max(Salary) as Salary
      From Employee group by Department) E2
      Where E1.Department = E2.Department
      And E1.Salary

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

    Update command I do rarted update table name set sal=36000 wher emp_id ;

  • @famousbirds8800
    @famousbirds8800 2 года назад

    How to find nth highest salary??

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

    Moru of the name is same retyo now

  • @ChandraSekhar-kl9ue
    @ChandraSekhar-kl9ue 3 года назад

    everything is in blur not able to view

  • @nikhilchougule5780
    @nikhilchougule5780 3 года назад +1

    Query to get salary of all employees except Ram

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

    Very useful ❤️

  • @riteshroy4940
    @riteshroy4940 4 года назад +1

    Great sir