Introduction - Part 2

Duration: 6 min

This video lesson is available to enrolled students.

Return to /learn/CAPGEMINI-PREPARATION/sql-technical-mcq-interview/sql/nested-correlated-subqueries/asset-introduction-part-2 after enrolling

Inside: a video lesson and guided study material.

Module outline

  1. English Communication: Communication Assessment, English Writing Ability, Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions)
  2. Artificial Intelligence (AI Literacy): AI & ML by Arun Sir
  3. Programming, Logic & Problem Solving (Technical Assessment): Language Design, Pseudo Codes
  4. DSA (Technical Assessment): Introduction to DS, Array, Stack, Queue, Linked List
  5. Software Engineering (Technical Assessment): Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Testing, Software Maintenance and Configuration Management
  6. OOPs (Technical Assessment): Object Oriented Programming (OOPS)
  7. DBMS (Technical Assessment): Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, Relational Calculus, Transaction Management, Concurrency Control, Database Recovery, ORDBMS, Database Security & Authorization, Query Processing & Optimization, Enhanced Data Models, Data Warehousing & Mining, Big Data Systems, NoSQL
  8. SQL (Technical Assessment): SQL
  9. Networking (Technical Assessment): Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Security, Mobile Technology
  10. Modern Engg Awareness (Technical Assessment): Emerging Tech Trends, Cyber and Info Security
  11. Debugging Assessment: Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Java
  12. Cognitive Assessment: Gamified / Game Based Aptitude, Seating Arrangements, Puzzle Solving (Puzzles), Data Arrangement, Blood Relations, Directions (Direction Test), Coding Decoding, Series (Number and Letter Series) (Numerical Relations and Reasoning), Logical Sequence Of Words, Ranking, Order and Sequence, Data Sufficiency, Inequality, Venn Diagram, Syllogisms, Cubes & Dices, Calendar, Clock, Analytical Reasoning (Counting Figures Reasoning), Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Selection Decision Table (Decision Making), Behavioral Assessment (Behavioral Competency Profiling) (Psychometric Test)
  13. HR Interview: MR & HR Interview Preparation
AI summary & chapters

AI Summary

An AI-generated summary of this video lecture.

This lecture introduces the concept of subqueries in SQL, emphasizing that the inner query executes before the outer query. The instructor uses an EMP table schema containing columns eno, ename, sal, and dno to demonstrate practical applications. The lesson progresses through three specific problems: finding the highest salary, determining the second highest salary, and identifying the name of the employee with the second highest salary. Visual aids include a drawn sample data table and step-by-step SQL syntax writing on the screen.

Chapters

  1. 0:00 – 2:00 00:00-02:00

    The instructor introduces subqueries by explaining the execution order where the inner query runs before the outer query. A slide displays the EMP table structure with columns eno, ename, sal, and dno. The instructor lists three specific problems to solve: finding the highest salary in the company, finding the second highest salary, and retrieving the name of the employee with the second highest salary. A sample data table is drawn on screen to illustrate the data points, including a maximum salary value of 300.

  2. 2:00 – 5:00 02:00-05:00

    The lesson focuses on constructing SQL queries for the second highest salary. The instructor writes the query 'select max(sal) from emp' to find the maximum value, which is identified as 300. To solve for the second highest salary, a subquery is introduced: 'select max(sal) from emp where sal < (select max(sal) from emp);'. The instructor annotates the logic with intermediate results, showing that salaries less than 300 are filtered to find the next highest value, such as 250. The instructor begins transitioning to a query that retrieves the employee name associated with this salary.

  3. 5:00 – 5:31 05:00-05:31

    The instructor completes the demonstration by writing out three distinct SQL query examples on screen. The first finds the maximum salary, the second uses a less-than operator to find the second highest salary, and the third finds the name of the employee with that specific salary. The screen displays the full syntax for these nested queries, including equality and inequality operators to match employee names with their corresponding salary values. The instructor emphasizes the step-by-step logic of using subquery results in the outer query conditions.

The lecture provides a foundational understanding of SQL subqueries by breaking down complex queries into executable steps. The core concept is that the inner query executes first, providing a result that the outer query uses for filtering or comparison. The instructor effectively uses the EMP table example to show how 'select max(sal) from emp' yields 300, which is then used in a subquery to find the next highest value. This progression from simple aggregation to nested filtering demonstrates how to solve multi-step data retrieval problems efficiently.

Loading lesson…