Finding if department is male or female dominant | SQL Problem solving

preview_player
Показать описание
In this SQL problem solving session, we identify if all the employees of a department are of particular gender dominated or not.

Table creation & insertion script:
CREATE TABLE employee_details(
emp_id INT,
emp_name VARCHAR(100),
emp_age INT,
emp_gender CHAR(1),
emp_dept VARCHAR(100)
);

INSERT INTO employee_details VALUES(127,'Kapil',28,'M','HR'),
(156,'Taruni',26,'F','Sales'),
(35,'Dhananjay',27,'M','IT'),
(67,'Vikas',31,'M','IT'),
(211,'Amol',24,'M','HR'),
(103,'Kishore',58,'M','Sales'),
(35,'Kiran',33,'F','Executive'),
(87,'Roopa',29,'F','IT'),
(16,'Sonakshi',47,'F','Executive'),
(73,'Suhani',25,'F','IT'),
(183,'Kundan',38,'M','Sales'),
(25,'Parinita',41,'F','Executive');

#sql #sqlprogramming #sqlqueries #interview
Рекомендации по теме
Комментарии
Автор

very good Bro. Keep it up. And it seems u forget the create script to paste.

avirajankitjain