Summary
Keywords
Full Transcript
Subquery in SQL || SQL Subquery tutorial with examples A subquery in SQL, also known as an inner query or nested query, is a query embedded within another SQL query. It allows for more dynamic and flexible data retrieval by providing input to the main (outer) query. Subqueries are commonly used to perform comparisons, filter data, or derive values from one table for use in another. Want more similar videos- hit like, comment, share and subscribe ❤️Do Like, Share and Comment ❤️ ❤️ Like Aim 5000 likes! ❤️ ➖➖➖➖➖➖➖➖➖➖➖➖➖ Please like & share the video. ➖➖➖➖➖➖➖➖➖➖➖➖➖ script CREATE TABLE Departments ( department_id INT PRIMARY KEY, department_name VARCHAR(50), location VARCHAR(50) ); CREATE TABLE Employees ( employee_id INT PRIMARY KEY, employee_name VARCHAR(50), department_id INT, salary DECIMAL(10, 2), FOREIGN KEY (department_id) REFERENCES Departments(department_id) ); INSERT INTO Departments (department_id, department_name, location) VALUES (101, 'Sales', 'New York'), (102, 'IT', 'Chicago'), (103, 'HR', 'San Francisco'); INSERT INTO Employees (employee_id, employee_name, department_id, salary) VALUES (1, 'Alice', 101, 5000), (2, 'Bob', 102, 6000), (3, 'Carol', 101, 5500), (4, 'Dave', 103, 7000), (5, 'Eve', 102, 6500); ➖➖➖➖➖➖➖➖➖➖➖➖➖ AWS DATA ENGINEER : https://www.youtube.com/playlist?list=PLOlK8ytA0MghpdMjb0m9zu1v9s_qbRP0q Azure data factory : https://youtube.com/playlist?list=PLOlK8ytA0MgguN5XidtQXbILxwCdJCUJE&si=iEICXHP80zGchUYh Azure data engineer playlist : https://youtube.com/playlist?list=PLOlK8ytA0MghBrzu0i6WlTBdoO1WdwV_e SQL PLAYLIST : https://www.youtube.com/playlist?list=PLOlK8ytA0MggGXIKmbfZ-_Xqcos3JKdV- PYSPARK PLAYLIST - https://www.youtube.com/playlist?list=PLOlK8ytA0MgjvOpd-088NRU_vTYw_aryH ➖➖➖➖➖➖➖➖➖➖➖➖➖ 📣Want to connect with me? Check out these links:📣 Join telegram to discuss https://t.me/+Cb98j1_fnZs3OTA1 ➖➖➖➖➖➖➖➖➖➖➖➖➖ what we have covered in this video: ➖➖➖➖➖➖➖➖➖➖➖➖➖ Hope you liked this video and learned something new :) See you in next video, until then Bye-Bye! ➖➖➖➖➖➖➖➖➖➖➖➖➖
