Interview Questions SQL Queries SQL Server Q&A

How to find the Max Value among the above Table Values ?

Posted By Vinod Kumar KJ

QUERY :

OUTPUT :

Read More

Interview Questions SQL Queries SQL Server Q&A

Generic Query to find max of salary by department of an employee ?

Posted By Vinod Kumar KJ


  • In the above table will take Deptno 102 as an example and will discuss.
  • In deptno 102 there are three employees and all employees salaries are same which all of them are fall under Max salaries.
  • So we need to display dept wise max salaries of employees even though two or more employees are having same salaries.

    By using CTE and Dense_Rank we can achieve this

    QUERY :

    OUTPUT

    Proud to be a Teacher

    Read More
  • Differences Between Function and a StoreProcedure ?

    Interview Questions SQL Queries SQL Server Q&A

    Differences Between Function and a StoreProcedure ?

    Posted By Vinod Kumar KJ

    Read More

    Interview Questions SQL Queries SQL Server Q&A

    How to schedule the matches between IND,AUS & PAK ?

    Posted By Vinod Kumar KJ

    METHOD 1:

    Using Derived Table

    METHOD 2:

    Using Common Table Expression(CTE)

    OUTPUT

    Read More

    Interview Questions SQL Queries SQL Server Q&A

    How to find alternative(Odd and Even) rows from a table ?

    Posted By Vinod Kumar KJ

    How to display the even numbers from a table ?

    How to display the odd numbers from a table ?

    Read More