Blog Archives
1 2 3 4

09: 50+ SQL scenarios based interview Q&As on GROUP_CONCAT() & STRING_AGG()

This post covers an SQL scenario, and how to solve it with NON ANSI 92 aggregate functions. Refer to your database documentation for the additional aggregate functions. In this post …



10: 50+ SQL scenarios based interview Q&As on split delimited column values to rows

This extends 09: 50+ SQL scenarios based interview Q&As on GROUP_CONCAT() & STRING_AGG().

In the previous post we looked at how to implode or concatenate multiple row column values …



11: 50+ SQL scenarios based interview Q&As on LEAD(..) & LAG(..) window functions

LEAD(..) & LAG(..) are Window functions, which perform operations for each row of the partition or window. LEAD() and LAG() are used to accesses a value stored in a row …



12: 50+ SQL scenarios based interview Q&As on Nth value with variations

This extends 50+ SQL scenarios based interview Q&As on Nth value with some variations to practice. Problem statement & considerations Find the 5th highest salary for each department. If the …



13: 50+ SQL scenarios based interview Q&As on self-join

Let’s try solving a problem statement given below by creating sample data & then an SQL query on db-fiddle using MySQL v8 database. You can also look at a hierarchical …



14: 50+ SQL scenarios based interview Q&As on order of SQL executions

This post reiterates the importance of understanding the order of execution of the SQL statements. Also, always think of the data granularity (aka grain). This post also demonstrates that …



15: 50+ SQL scenarios based interview Q&As on pivoting & aggregate functions

In this post let’s look at an SQL scenario, and three different ways to solve this scenario. There could be more ways to solve an SQL scenario. Problem Statement Given …



15+ SQL optimisation interview questions & answers with scenarios

1) Select fields instead of using SELECT *. The “*” is used as a short hand to query all available data from a table. If a table has many fields …



16: 50+ SQL scenarios based interview Q&As on joins to reconcile source & target tables

In SQL often we need to merge records from a source table to a target table. The source table could be a staging table where the source system sent new …



17: 50+ SQL scenarios based interview Q&As on teams & matches played

Let’s look at a standard teams interview question to understand your SQL knowledge in using a non-equi join. Problem Statement 1 Given the below 5 teams



18: 50+ SQL scenarios based interview Q&As on account balance

Here is another SQL scenario based interview question to determine a candidate’s ability to translate a business requirement into an SQL query. Problem Statement Given the below data of running …



19: 50+ SQL scenarios based interview Q&As on effective_date

Here is another SQL scenario based interview question to determine a candidate’s ability to translate a business requirement into an SQL query. These are scenarios where you want to find …



20: 50+ SQL scenarios based interview Q&As on first visit vs repeated visits

Let’s look at a very common problem statement of finding out the repeat customers, repeat visits, etc. The key to this problem is first determining the first visit or first …



1 2 3 4

300+ Big Data Interview Questions - FAQs

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data