SQL Queries Interview Questions and Answers | Commonly Asked SQL Questions in Interview

The most commonly asked interview questions and answers for SQL Interviews. In this article, we will discuss and focus mainly on the SQL Queries Interview.

SQL Query To Print Details Of The Employees Who Have Born In Specified Year

select * from employees
where year(birth_date) = 1965

SQL Query To Print Details Of The Employees Whose FIRST_NAME Ends With ‘t’.

select * from employees
where first_name like '%t'

SQL Query To Print Details Of The Employees Whose SALARY Lies Between 10000 And 50000

select * from employees
where salary between 10000 and 50000

SQL Query To Fetch Employees Names With Salaries >= 20000 And <= 40000

select first_name, salary from employee
where salary between 20000 And 40000

SQL Query to concatenate or join multiple strings

select CONCAT(first_name,' ', last_name)
from employees

SQL Query to Calculate The Difference Between Two Dates?

SELECT DATEDIFF(date1, date2);

select DATEDIFF(hire_date,birth_date)
from employees

This article will be updated with more SQL Queries Interview Questions and Answers every week, so keep visiting for more updates.

Share

Leave a Reply