Avatto>>DATA SCIENTIST>>SHORT QUESTIONS>>SQL For Machine Learning
DeotNo Dname Loc
50 Service Delhi
51 Account Mumbai
SELECT * FROM dept;
DeptNo Dname Loc
50 Service Delhi
51 Account Mumbai
SELECT DISTINCT(job) FROM dept;
EmpNo EName Job MGR HireDa Sal Comm DeptNo
1234 Amit Waiter 8382 19-Oct -18 50000 500 50
5678 Ashish Analyst 8635 2-Nov-18 60000 200 51
SELECT COUNT(*) FROM emp;
EmpNo EName Job MGR HireDa Sal Comm DeptNo
1234 Amit Waiter 8382 19-Oct -18 50000 500 50
5678 Ashish Analyst 8635 2-Nov-18 60000 200 51
SELECT * from emp ORDER BY Sal;
EmpNo EName Job MGR HireDa Sal Comm DeptNo
1234 Amit Waiter 8382 19-Oct -18 50000 500 50
5678 Ashish Analyst 8635 2-Nov-18 60000 200 51
SELECT * from emp WHERE EmpNo in (SELECT MGR FROM emp);


Description