Sharing Knlowledge With The World…

Month: October 2014

Top 10 Medium Level SQL Interview Question And Answers


These are some of the Top 10 Medium SQL Interview Question And Answers That A 1 Year Exp person should know.

Please subscribe to our blog to download the PDF regarding  SQL Interview Question And Answers , it will be directly mailed to you.

1) Write SQL Query to find details of employee with second highest salary of Employee table
2) SQL Query to find Max Salary from each department.
3) Write SQL Query to display current date.
4) Write an SQL Query to check whether date passed to Query is date of given format or not.
5)  Write a SQL Query to print the name of distinct employee whose DOB is between 01/01/1960 to 31/12/1975.
6) Write an SQL Query find number of employees according to gender  whose DOB is between 01/01/1960 to 31/12/1975.
7)Write an SQL Query to find employee whose Salary is equal or greater than 10000.
8)Write an SQL Query to find name of employee whose name Start with ‘M’
9) find all Employee records containing the word "Joe", regardless of whether it was stored as JOE, Joe, or joe.
10) Write a SQL Query to find  year from date.

Check this post on Top 13 Sql Interview Questions And Answers

Continue Reading

Top 13 SQL Interview Questions And Answers


Welcome to our Top 13 SQL Interview Questions and Answers page, we  start with basic questions, move on to intermediate level and finish on advanced questions.

NOTE: If you would like to focus on basic SQL interview questions only then we recommend visiting our Basic Interview Q&As page.

we will be uploading a pdf very soon for the post sql interview questions and answers , one should give when appearing for an interview. kindly subscribe to grab your copy.

Questions are split into 3 levels :-

Questions For Fresher’s:

Question 1: What type of joins have you used? 
Question 2: How can you combine two tables/views together? For instance one table contains 100 rows and the other one contains 200 rows, have exactly the same fields and you want to show a query with all data (300 rows). This sql interview question can get complicated. 
Question 3: What is the difference between where and having clause? 
Question 4: How would apply date range filter? 
Question 5: What type of wildcards have you used? This is usually one of mandatory sql interview question. 
Question 6: How do you find orphans? 
Question 7: How would you solve the following sql queries using today's date: First day of previous month, First day of current month, Last day of previous month, Last day of current month?

Questions For Experienced:

Question 8: You have a table that records website traffic. The table contains website name (multiple websites), page name, IP address and UTC date time. What would be the query to show all websites visited in the last 30 days with total number or visits, total number if unique page view and total number of unique visitors (using IP Address)? 
Question 9: How to display top 5 employees with the higest number of sales (total) and display position as a field. Note that if both of employees have the same total sales values they should receive the same position, in other words Top 5 employees might return more than 5 employees.

Advanced Questions:

Question 10: How to get accurate age of an employee using SQL? 
Question 11: This is SQL Server interview question. You have three fields ID, Date and Total. Your table contains multiple rows for the same day which is valid data however for reporting purpose you need to show only one row per day. The row with the highest ID per day should be returned the rest should be hidden from users (not returned). 
Question 12: How to return truly random data from a table? Let say top 100 random rows? 
Question 13: How to create recursive query in SQL Server?

Check this post on Top Medium Level Interview Question And Answers

Continue Reading