Introduction - Part 2

Duration: 6 min

This video lesson is available to enrolled students.

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

Inside: a video lesson and guided study material.

Module outline

  1. Quantitative Aptitude: Number System, Percentage, Profit and Loss, Ratio and Proportion (Ratios), Average, Time and Work, Speed Time and Distance, Simple Interest and Compound Interest, Mixture and Alligation, Data Interpretation, Permutation and Combination, Probability, Logarithm, Powers and Exponents (Surds and Indices), Age Problems, Divisibility Rules, Partnership, HCF LCM, Algebra, Pipe and Cistern
  2. Logical Reasoning: Series (Number and Letter Series) (Numerical Relations and Reasoning), Analogy, Coding Decoding, Blood Relations, Directions (Direction Test), Syllogisms, Logical Sequence Of Words, Data Sufficiency, Seating Arrangements, Puzzle Solving (Puzzles), Calendar, Clock, Cubes & Dices, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Data Arrangement
  3. English Language: Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Sentence Correction (Error Correction), Sentence Completion (Fill in the blanks), Vocabulary, Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Active Passive Voice (Voice), Direct and Indirect Speech, Cloze Test (Cloze Passage), Tenses, Subject Verb Agreement (Verb Noun Agreement), Preposition, Articles, Conjunction, Adverb
  4. Written English Test: English Writing Ability
  5. Coding: Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Java, Python for Placements by Yash Sir
  6. Communication Round: Communication Assessment
  7. DBMS (Technical Interview): 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, Big Data Systems, NoSQL, Data Warehousing & Mining
  8. SQL (Technical Interview): SQL
  9. Operating Systems (Technical Interview): Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Deadlock, Threads & Process Creation, Memory Management, Virtual Memory, Disc Scheduling, File Management, Windows OS, Linux OS, Security, Distributed Systems, Virtual Machines
  10. Computer Networks (Technical Interview): 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, Cloud Computing and IoT, Cyber and Info Security
  11. OOPs (Technical Interview): Object Oriented Programming (OOPS)
  12. 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…