Sign In | Feedback | Donate | Search
Katie and Emil Logo
Vote Yes! I like it! [+0]  |  Vote no! Dislike? [-0]
Author: by Emil Glownia

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.

Take care

Emil

Upsss... Something went wrong and Google Ads on our website did not display.

Google ads sponsor FREE content on our website and without them it would not exist.

How to fix the problem?
  1. Check if the Google Search display any ads by searching the term Business Intelligence
    • If ads don't display, try different search terms and if there no ads then there might be a problem with your browser. If you made changes to your browser behaviour then undoing them will help.
    • If ads display then, refresh our page one more time, if the problem is still there than please contact us.
  2. Become 'No Ads Learner' Member or if you are already one Sign In.
Close
Take care
Katie & Emil
Well done! It seems Google Ads display properly now on our website.

Access our website's FREE content for FREE!