How to do Subqueries in SQL with Examples













YOUR LINK HERE:


http://youtube.com/watch?v=GpC0XyiJPEo



Step-by-step tutorial shows you how to use SQL subqueries in your SELECT statement FROM and WHERE clauses! • Queries: • 1) A subquery in the SELECT statement: SELECT customerid, freight, (SELECT AVG(freight) FROM orders) FROM orders • 2) A subquery in the FROM clause: SELECT shipcountry, AVG(num_orders) FROM (SELECT customerid, shipcountry, count(*) AS num_orders FROM orders GROUP BY 1,2) sub GROUP BY 1 • 3) A subquery in the WHERE clause: SELECT * FROM orders WHERE employeeid IN (SELECT employeeid FROM employees WHERE LOWER(firstname) LIKE '%b%') • Get the Northwind Database:    • How to Load a Sample PostgreSQL Datab...   • Support the Channel: • 1) Subscribe: • 2) DataCamp: • 3) Udacity:

#############################









Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org