Instructions: Write the suitable SQL statement to answer the following questions based on the following tables ( image for better table) Table Name: Employee EMP_ID FNAME LNAME SALARY JOIN_DATE DEP_NO 101 John Abraham 10000 01-JAN-13 11 202 Michael Clarke 80000 01-JAN-13 22 303 Roy Thomas 70000 01-FEB-13 11 404 Tom Jose 60000 01-FEB-13 22 505 Jerry Pinto 65000 01-FEB-13 22 606 Philip Mathew 75000 01-JAN-13 33 707 Thomas Jack 65000 01-JAN-13 33 Table Name: Reward EMP_ID REWARD_DATE AMOUNT 101 01-FEB-13 5000 202 01-FEB-13 3000 303 01-FEB-13 4000 101 01-JAN-13 4500 202 01-JAN-13 3500 Table Name: Department DEP_NO DEP_NAME 11 Banking 22 Insurance 33 Services 44 Marketing the question is: 5. Retrieve number of Employee under each Department.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
Instructions:
Write the suitable SQL statement to answer the following questions based on the following tables ( image for better table)
Table Name: Employee
EMP_ID FNAME LNAME SALARY JOIN_DATE DEP_NO
101 John Abraham 10000 01-JAN-13 11
202 Michael Clarke 80000 01-JAN-13 22
303 Roy Thomas 70000 01-FEB-13 11
404 Tom Jose 60000 01-FEB-13 22
505 Jerry Pinto 65000 01-FEB-13 22
606 Philip Mathew 75000 01-JAN-13 33
707 Thomas Jack 65000 01-JAN-13 33
Table Name: Reward
EMP_ID REWARD_DATE AMOUNT
101 01-FEB-13 5000
202 01-FEB-13 3000
303 01-FEB-13 4000
101 01-JAN-13 4500
202 01-JAN-13 3500
Table Name: Department
DEP_NO DEP_NAME
11 Banking
22 Insurance
33 Services
44 Marketing
the question is:
5. Retrieve number of Employee under each Department.
Step by step
Solved in 2 steps