Basic SQL Interview Questions

My Learning: Log in Learning Report [Log in]


Remove Ads or Log in
Remove Ads or Log in
+0  |  -0

This blog post has been created to cover basic SQL interview questions and answers and we will use questions related to SQL Server however most of them might be applicable to other database products.

For more information visit SQL Server Interview questions (collection of Q&A) or SQL Interview questions.

Tutorial: If you would like to learn more about SQL visit our SQL Tutorial

Certification: To get a quantification you can visit our exam guide for 98-364 Database Fundamentals and Exam guide for 70-461 Querying with SQL Server 2012 (this one requires more SQL skills and knowledge)

Basic SQL Interview Questions

Questions with * are related to SQL Server or when I am not sure if the same behavior is in different products.

First part is theory SQL questions.

Questions:

  1. What does SQL Stands for?
  2. Name all SQL Clauses in correct order and briefly describe them.
  3. What is the difference between WHERE and HAVING?
  4. How would you join multiple tables together in a query?
  5. Name all joins types you know and describe them.
  6. What is a subquery and a derived table?
  7. What is an aggregate function?
  8. Describe all types of aggregate functions you know. 
  9. What is the difference between deterministic and non-deterministic functions?
  10. Describe Logical Query Processing.

Answers:

1. What does SQL Stands for?

  • SQL stands for Structured Query Language. For more info visit What is SQL?

2. Name all SQL Clauses in correct order and briefly describe them.

3. What is the difference between WHERE and HAVING?

  • Where filters rows. Having filters groups.

4. How can you combine two queries together which contain the same structure but cover different time period.

5. Name all joins types you know and describe them.

6. What is a subquery and a derived table?

  • Subquery allows us to get single field values (or values) inside our main query (for instance where condition or select)

7. What is an aggregate function?

8. Describe all aggregate functions you know. 

9. What is the difference between deterministic and non-deterministic functions?

  • Deterministic means that you can work out the result and non-deterministic is that you are not able to work out the precise result.

10. Describe Logical Query Processing.


Remove Ads or Log in

We need you!

By becoming a proud member we can:
  • Switch off annoying ads
  • Create more articles and videos
  • Develop more useful features supporting your learning
  • Provide FREE webinars (for members)
  • Feel our hard work since 2011 is appreciated
Become a proud member and get exclusive features.

If 2% of our 64,943 visitors (Last 30 days) become a proud member than we can quit our jobs and work full time on this website. We started membership in May 2014 and so far 0.07% of our visitors are members and we would like to say THANK YOU to those who become a proud member and support our efforts.

Thanks to members:
  • Education is for FREE and we create more FREE articles and videos
  • We provide new features (members) that can speed up learning.
  • 53% of our page views (82,000 each month) do not have page ads.
  • We switched video ads from 14% of our videos (50 out of 345).
We have invested 4 years of our time in this website and we estimate it will take about 5 years before we can quit our jobs and dedicate all our time to develop considerably our website which should help to truly achieve our vision of free education for everyone; all thanks to support of our members only. Become a proud member

Visitor Voting

Did you know we (Katie & Emil) immigrated to UK in 2005 without knowing English, having any IT skills (or degree) and we set up a website in 2008 to learn by teaching?
Visitor Voting: Yes +13  |  No -6
Add comment (no email required).



Add Comment
No data was returned.


Are you a member?

If yes than please log in

Learning Map is for members with Bronze, Silver and Gold Membership.
For more information visit membership options.


Close this window , log in or learn more about membership benefits
  Become a Proud Member