Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MYSQL code This project involves using various Database concepts to solve Human Resources use cases. This requires skills like Database concepts, SQL Queries, etc. In

MYSQL code
This project involves using various Database concepts to solve Human Resources use cases. This requires skills like Database concepts, SQL Queries, etc.
In this project, the MySQL database schema consists of the following tables:
regions : It contains data of different regions of departments.
countries : It contains data where departments are based.
locations : It contains location data of departments.
departments : It contains all different departments.
employees : It contains data of all the employees.
jobs : It contains data for minimum and maximum salaries with respect to jobs.
Exercise
List the department ID and name
You need to write a SQL Query in order to solve the following problem:
A query to get the department ID and name of all the departments where no employee is working.
The final output shall contain four columns. i.e "DEPARTMENT_ID", "DEPARTMENT_NAME" , "MANAGER_ID", "LOCATION_ID".
Constraints
Time Limit: 1 sec(s)
Important Notes
Please note that sample data has already been loaded in a dedicated database for you. It is not being shared by anyone else.
In order to run the SQL Commands, please directly use table names in the queries and exclude the database name. Refer to some sample queries below for better understanding(Assume there is a table `customer` with columns `id`and `name` already loaded in a database `user`):
Write a SQL query to find the id of the customer whose name is 'ABC'.
The query that you need to put in the SQL Editor below would be: SELECT id from customer where name = 'ABC'
Write a SQL query to find the id of the customer whose name starts with 'ABC'.
The query that you need to put in the SQL Editor below would be: SELECT id from customer where name LIKE 'ABC%'

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions