The tables : Employee Course STARTDATE ENDDATE SALARY 12-JAN-76 EMPNO POSITION 3
ID: 3670331 • Letter: T
Question
The tables :Employee
Course
STARTDATE ENDDATE SALARY 12-JAN-76 EMPNO POSITION 30000 1 Accounts Manager Assistant Accounts Manager 11-FEB-72 12-JAN-76 22000 Accountant Junior Accountant 10-MAR-68 11-FEB-72 15000 09-APR-64 10-MAR-68 6000 25000 2 Assistant Accounts Manager 08-MAY 76 Accountant Junior Accountant 07-JUN-7108-MAY-76 16000 06-JUL-6707-JUN-71 8000 05-AUG-84 116000 | -Accountant 3 Junior Accountant 04 SEP 81 05-AUG 84 3000 116000 | 16000 05-OCT-89 02-NOV-80 01-DEC-78 02-NOV-80 8000 12-JAN-80 11-FEB-74 12-JAN 80 8000 10-MAR-80 Accountant 5 Accountant 5Junior Accountant 6 Accountant 6Junior Accountant 7 Admin Manager 6 Accountant 16000 30000 Assistant Admin Manager 09-APR-74 10-MAR-80 22000 Senior Admin Assistant 7 Admin Assistant Assistant Admin Manager 01-DEC-68 09.APR-74 16000 07-MAY 60 01-DEC-68 10000 10-MAR-80 09-APR-77 10 MAR-80 12000 01-DEC 76 09.APR-77 8000 10-JUL-88 08-JUN-82 10-JUL-88 10000 06-SEP-86 20000 Senior Admin Assistant 8Admin Assistart 9 Senior Admin Assistant 14000 10 10 11Admin Assistant Admin Assistant Admin Assistant Junior Admin Assistant 12000 122 SEP 33 106-SEP.86 6000 13-MAR-82 15000
Explanation / Answer
In general we use this query:
SELECT COUNT(*) FROM JOBHISTORY,EMPLOYEE WHERE JOBHISTORY.EMPNO=EMPLOYEE.EMPNO;
but best way for optimising query is
SELECT COUNT(1) FROM JOBHISTORY,EMPLOYEE WHERE JOBHISTORY.EMPNO=EMPLOYEE.EMPNO;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.