Blog Archives
1 … 7 8 9 10 11 12 13 14 15 16

21: 50+ SQL scenarios based interview Q&As on distinct count of all columns

We all know how to get a distinct count of a column. It can be done with COUNT(DISTINCT column_name). For example:

Outputs:

In this post let’s look at various approaches to count unique values. Using DISTINCT, … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


21: PySpark map vs flatMap Interview Q&As with tutorials

Q01. What is the difference between map and flatMap operations in Spark?
A01. The map and flatMap are transformation operations in Spark.

map transformation is applied to each element of RDD or a DataFrame and it returns the result as a new RDD or a DataFrame.

…

Read more ›



21: Q138 – Q142 AWS data lakes overview Interview Q&As

Q138. What are the basic considerations when building a data lake on an AWS platform?
A138.

1. Ingestion into S3 (i.e. Simple Storage Service) from different source systems. E.g. csv/xml/json files extracted from source systems, streamed data from source systems via message queues/topics,

…

Read more ›



22: 50+ SQL scenarios based interview Q&As on recursion

This extends Common Table Expressions (i.e. CTE) in SQL using the “WITH” clause. You can try the example on DB Fiddle. Use MySQL v8.0 or later. Scenario: 1 Given a table like this with each entry with two dates (i.e. from_date & … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


22: PySpark Row object Interview Q&As with tutorials

This extends PySpark map vs flatMap Interview Q&As with tutorials. Q01. What is a Row object in PySpark? A01. Row can be used to create a row object by using named arguments. The previous example can be represented with a Row object. … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


23: 50+ SQL scenarios based interview Q&As – Join counts

One of the common SQL interview questions is to quiz your understanding of SQL joins. In this let’s look at joins example with two scenarios.

Venn Diagram

Joins can be specified as a venn diagram shown below:

But, it gets a bit more tricky when you consider the below scenarios:

Scenario 1: When both input tables don’t have duplicate values.

…

Read more ›



24: 50+ SQL scenarios based interview Q&As – Window Query

If you want to learn the basics of SQL analytics function, first read SQL analytic functions interview questions – Part 1 | SQL analytic functions interview questions – Part 2 | SQL analytic functions interview questions – Part 3

Given the below data:

Q1.

…

Read more ›



25: 50+ SQL scenarios based interview Q&As – get the last non null value

The below SQL problem can be practiced on MySQL database at db-fiddle or database of your choice. Q1. Given the below data, how will you find the last non null values for each event_id?

Create table & insert data

Solution In order to ignore null values “CASE WHEN...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


25+ SQL interview questions & answers – beginner

SQL interview Questions & Answers is a must for any developer as all non-trivial applications need to talk to a database with CRUD operations. Q3 – Q15 are very popular with the interviewers. If you want to quickly practice your SQL skills try DB Fiddle or install MySQL locally as...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


25+ SQL interview questions & answers – intermediate to experienced

This continues 25+ SQL interview questions & answers – beginner

Q16. Why do you have CASE statements in SQL?
A16. CASE statements in SQL are similar to IF and ELSE conditions in programming languages. CASE statements are used to fetch particular values based on certain conditions.

…

Read more ›



26: 50+ SQL scenarios based interview Q&As – number of logins by transaction count

Setup the data on db-fiddle MySQL V8.0 to practice. This question is based on the LeetCode SQL problem Q. Given the below input: login table

txn table

how will you write SQL query to output: 1) How many users who logged in did not do any transactions? …...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


26: 50+ SQL scenarios based interview Q&As – Window function (i.e. OVER(…)) with GROUP BY

The below SQL problem can be practiced on MySQL database at db-fiddle or database of your choice. Use latest version from the drop down.

Q1. Given the below data, how will you get the individual sum of the count by score and cumulative sum over the whole data?

…

Read more ›



27: 50+ SQL scenarios based interview Q&As – identifying consecutive records – job status repetition

The data analysts & engineers will often be faced with the below SQL scenario at work. It is also often asked in job interviews. This solution uses SQL analytical functions & you can learn more about them at SQL analytic functions interview questions – Part 1

Setup the data on db-fiddle MySQL V8.0 to practice.

…

Read more ›



1 … 7 8 9 10 11 12 13 14 15 16

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data