Computer Science, asked by ahslove6165, 10 months ago

Write a query to display the block number and number of departments in each block and give an alias as NO_OF_DEPT

Answers

Answered by varshakeram
5

Answer:

Write a query to get the department name and number of employees in the department.

Sample table: employees

Sample table: departments

Answered by stefangonzalez246
6

SQL QUERY

 select block number, count(num_dept) as NO_OF_DEPT from college

 The table name is college, it contains all the details of the students and the departments. The Count number of department in a block must be in new column as alias name as NO_OF_DEPT.

   The Questions to find the answer is to display the no of the departments in the block, with the dept name to.

 The query is written for to display only the number and count of the department in the block. If the block is used to display by the name and the department is count for a single block by using the Count function. And name using alias name NO_OF_DEPT.

To Learn More...

  • brainly.in/question/14920362

Similar questions