SQL Tutorial 13 Introduction to JOIN, cartesian product

preview_player
Показать описание
The CARTESIAN JOIN or CROSS JOIN returns the Cartesian product of the sets of records from the two or more joined tables.

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

thank you vry much sir to post this type of sql queries questions. this type pf questions r vry useful, most of technial hr's ask these type of queries only....guys these r very helpful videos...

pranavdeshpande
Автор

i like the way you introduced subquery and progressed to join.

spicytuna
Автор

In the beginning, you teach well! in these last lessons I though you are not teaching with passion

inavdeeppaliwal
Автор

Per job how many employees are from mumbai?

The answer may be this also

select designation, count(*)
from emp
where deptno in (select deptno
from dept
where loc='mumbai')
group by designation;

VishambarPandey
Автор

Tutorial 13 || All Question Details ||
Oracle DB
Note My Table name is LCO and not LOC



Questions::

1) In which location employee aaa work
2) list employee along with their location
3) Name salary and Department of all employees
4) List Name and location od highest salary employees
5) Per Job, how many employees are from Mumbai
6) Per location, how many employees are present



A ::

1) select ename, lco from emp, dept where emp.deptno = dept.depno and ename='aaa';
2) select enno, ename, lco from emp, dept where emp.deptno = dept.depno;
3) select ename, sal, DEPNAME from emp, dept where emp.deptno = dept.depno;
4) select ename, sal, lco from emp, dept where emp.deptno = dept.depno and sal in (select max(sal) from emp);
5) select designation, COUNT(*) from emp, dept where emp.deptno = dept.depno and lco='mumbai' GROUP BY designation;
6) select lco, count(*) from dept, emp where emp.deptno = dept.depno GROUP BY lco ;

Really thanks for the tutorials
Happy learning to everyone
Sorry in advance if I have made mistakes in answers

vaibhavdadas
Автор

In the lst question what can we do so that the output also show the Bangalore loc with count 0

simrankaur
join shbcf.ru