Coding interview preparation
5.82K subscribers
388 photos
67 files
164 links
Download Telegram
Top 20 SQL INTERVIEW QUESTIONS

1️⃣ Explain Order of Execution of SQL query
2️⃣ Provide a use case for each of the functions Rank, Dense_Rank & Row_Number ( 💡 majority struggle )
3️⃣ Write a query to find the cumulative sum/Running Total
4️⃣ Find the Most selling product by sales/ highest Salary of employees
5️⃣ Write a query to find the 2nd/nth highest Salary of employees
6️⃣ Difference between union vs union all
7️⃣ Identify if there any duplicates in a table
8️⃣ Scenario based Joins question, understanding of Inner, Left and Outer Joins via simple yet tricky question
9️⃣ LAG, write a query to find all those records where the transaction value is greater then previous transaction value
1️⃣ 0️⃣ Rank vs Dense Rank, query to find the 2nd highest Salary of employee
( Ideal soln should handle ties)
1️⃣ 1️⃣ Write a query to find the Running Difference (Ideal sol'n using windows function)
1️⃣ 2️⃣ Write a query to display year on year/month on month growth
1️⃣ 3️⃣ Write a query to find rolling average of daily sign-ups
1️⃣ 4️⃣ Write a query to find the running difference using self join (helps in understanding the logical approach, ideally this question is solved via windows function)
1️⃣ 5️⃣ Write a query to find the cumulative sum using self join
(you can use windows function to solve this question)
1️⃣6️⃣ Differentiate between a clustered index and a non-clustered index?
1️⃣7️⃣ What is a Candidate key?
1️⃣8️⃣What is difference between Primary key and Unique key?
1️⃣9️⃣What's the difference between RANK & DENSE_RANK in SQL?
2️⃣0️⃣ Whats the difference between LAG & LEAD in SQL?
2👏1
Clean Code Tips
2👏1
React.js Vs Next.js
1
Power BI Interview Questions with Answers Part-1 🔥

1. What is Power BI? 
   Power BI is a Microsoft business analytics tool that enables users to connect to multiple data sources, transform and model data, and create interactive reports and dashboards for data-driven decision making.

2. Explain the key components of Power BI. 
   The main components are:
Power Query for data extraction and transformation.
Power Pivot for data modeling and relationships.
Power View for interactive visualizations.
Power BI Service for publishing and sharing reports.
Power BI Mobile for accessing reports on mobile devices.

3. Differentiate between Power BI Desktop, Service, and Mobile.
Desktop: The primary application for building reports and models.
Service: Cloud-based platform for publishing, sharing, and collaboration.
Mobile: Apps for viewing reports and dashboards on mobile devices.

4. What are the different types of data sources in Power BI? 
   Power BI connects to a wide range of sources: files (Excel, CSV), databases (SQL Server, Oracle), cloud sources (Azure, Salesforce), online services, and web APIs.

5. Explain the Get Data process in Power BI. 
   “Get Data” is the process to connect and import data into Power BI from various sources using connectors, enabling users to load and prepare data for analysis.

6. What is Power Query Editor? 
   Power Query Editor is a graphical interface in Power BI for data transformation and cleansing, allowing users to filter, merge, pivot, and shape data before loading it into the model.

7. How do you clean and transform data in Power Query? 
   By applying transformations like removing duplicates, filtering rows, changing data types, splitting columns, merging queries, and adding calculated columns using the intuitive UI or M language.

8. What are the different data transformations available in Power Query? 
   Common transformations include filtering rows, sorting, pivot/unpivot columns, splitting columns, replacing values, aggregations, and adding custom columns.

9. What is M language in Power BI? 
   M is the functional programming language behind Power Query, used for building advanced data transformation scripts beyond the UI capabilities.

10. Explain the concept of data modeling in Power BI. 
    Data modeling is organizing data tables, defining relationships, setting cardinality and cross-filter directions, and creating calculated columns and measures to enable efficient and accurate data analysis.

Leave ❤️ for Part-2
4
Power BI Interview Questions with Answers Part-2 🔥

11. What are relationships in Power BI? 
Relationships define how data tables are connected through common columns (keys), enabling you to combine and analyze related data effectively across tables.

12. What are the different types of relationships in Power BI?
One-to-many: One row in table A relates to multiple rows in table B.
One-to-one: One row in table A relates to exactly one row in table B.
Many-to-many: Multiple rows in one table relate to multiple rows in another, supported via bridge tables.

13. What is cardinality in Power BI? 
Cardinality refers to the uniqueness of data values in a column that participates in a relationship, e.g., one-to-many cardinality means a unique key on one side and non-unique on the other.

14. What is cross-filter direction in Power BI? 
It determines how filters flow between related tables:
Single: Filters flow in one direction.
Both: Filters flow both ways, enabling bi-directional filtering in reports.

15. How do you create calculated columns and measures? 
Use DAX formulas in Power BI Desktop:
Calculated columns add extra columns at row level stored in the data model.
Measures are calculations performed dynamically on aggregated data during report interactions.

16. What is DAX? 
DAX (Data Analysis Expressions) is a formula language tailored for Power BI for creating custom calculations like calculated columns, measures, filtering, and aggregations within the data model.

17. Explain the difference between calculated columns and measures.
Calculated columns compute values row by row when data is loaded and store them.
Measures compute results on-the-fly, aggregate data dynamically depending on the filter context.

18. List some common DAX functions. 
Common functions include:
⦁ SUM(), AVERAGE(), COUNT(), RELATED(), CALCULATE(), FILTER(), IF(), ALL(), VALUES().

19. What is the CALCULATE function in DAX? 
CALCULATE() modifies the filter context of a calculation, enabling complex conditional logic and dynamic aggregation based on filters.

20. How do you use variables in DAX? 
Variables store intermediate values in a DAX formula for better readability and performance, declared using VAR and returned using RETURN.
1
Ultimate Git Cheatsheet
2👏1
Interviewer: How to make sure that, one service should not make the whole system down?

Developer:
By building Fault tolerance in Microservices. This can be achieved via Resilience4j. It provides many mechanism like RateLimiter,
TimeLimiter, Bulkhead, CircuitBreaker, Retry etc.
5
The Roadmap to Google/Amazon Interviews in 6-8 Months

Whether you're a student, career switcher, or self-learner, this plan is gold!

Step-by-step breakdown:
1 Learn to Code (C++, Java, or Python)
2 Master DSA First -Arrays,LinkedLists,Stacks, Queues
3 Give Contests - LeetCode & Codeforces to
improve speed
4 Revise Smart - Create your "100 Problem" revision sheet
5 Final Step - Resume, mock interviews & real applications

Bonus Tip:
Consistency > Talent Small daily actions = massive results over time.
2👏1
The Ultimate Java Interview Guide (136 Topics & 700+ Qs!)

Looking to ace your Java interviews? This comprehensive Java Interview Notes covers everything you need - from fundamentals to advanced concepts!

Key Highlights:
OOP, Collections, Generics
Multithreading & Concurrency
Memory Management & JVM
Modern Java (Lambdas, Streams)
Design Patterns & Best Practices

Perfect For:
Beginners learning Java
Intermediate devs leveling up
Experienced engineers prepping for
interviews

Found this amazing free resource and had to share! A goldmine for any Java developer.

Source : java_pdf
2👏1
JavaScript Interview Questions and Answers


What is JavaScript?
JavaScript is a lightweight, interpreted programming language primarily used to create interactive and dynamic web pages. It's part of the core technologies of the web, along with HTML and CSS.


What are the data types in JavaScript? JavaScript has the following data types:
Primitive: String, Number, Boolean, Null, Undefined, Symbol, BigInt
Non-primitive: Object, Array, Function


What is the difference between null and undefined?
null is an assigned value representing no value.
undefined means a variable has been declared but not assigned a value.


Explain the concept of hoisting in JavaScript.
Hoisting is JavaScript's default behavior of moving declarations to the top of the scope before code execution. var declarations are hoisted and initialized as undefined; let and const are hoisted but not initialized.


What is a closure in JavaScript?
A closure is a function that retains access to its lexical scope, even when the function is executed outside of that scope.


What is the difference between “==” and “===” operators in JavaScript?

== checks for value equality (performs type coercion)
=== checks for value and type equality (strict equality.


Explain the concept of prototypal inheritance in JavaScript.
Objects in JavaScript can inherit properties from other objects using the prototype chain. Every object has an internal link to another object called its prototype.


What are the different ways to define a function in JavaScript?
Function declaration: function greet() {}
Function expression: const greet = function() {}
Arrow function: const greet = () => {}


How does event delegation work in JavaScript?
Event delegation uses event bubbling by attaching a single event listener to a parent element that handles events triggered by its children.


What is the purpose of the “this” keyword in JavaScript?
this refers to the object that is executing the current function. Its value depends on how the function is called.


What are the different ways to create objects in JavaScript?
Object literals: const obj = {}
Constructor functions
Object.create()
Classes


Explain the concept of callback functions in JavaScript.
A callback is a function passed as an argument to another function and executed after some operation is completed.


What is event bubbling and event capturing in JavaScript?
Bubbling: event goes from target to root.
Capturing: event goes from root to target. JavaScript uses bubbling by default.


What is the purpose of the “bind” method in JavaScript?
The bind() method creates a new function with a specified this context and optional arguments.


Explain the concept of AJAX in JavaScript.
AJAX (Asynchronous JavaScript and XML) allows web pages to be updated asynchronously by exchanging data with a server behind the scenes.


What is the “typeof” operator used for? The typeof operator returns a string indicating the type of a given operand.


How does JavaScript handle errors and exceptions?
Using try...catch...finally blocks. Errors can also be thrown manually using throw.


Explain the concept of event-driven programming in JavaScript. Event-driven programming is a paradigm where the flow is determined by events such as user actions, sensor outputs, or messages.


What is the purpose of the “async” and “await” keywords in JavaScript?
They simplify working with promises, allowing asynchronous code to be written like synchronous code.


What is the difference between a deep copy and a shallow copy in JavaScript?
Shallow copy copies top-level properties.
Deep copy duplicates all nested levels.


How does JavaScript handle memory management?
JavaScript uses garbage collection to manage memory. It frees memory that is no longer referenced.


Explain the concept of event loop in JavaScript.

The event loop handles asynchronous operations. It takes tasks from the queue and pushes them to the call stack when it is empty.
2