Logical Operators ================= purpose: -------- -> when we want to apply more than one condition on the same data to make prepare the report we can use "logical operators". -> three types of logical operators: 1) logical and ==> and 2) logical or ==> or 3) logical not ==> not Q-1: Write a query to make report with employee name, department and salary from the employees table where the employees who are having the department of 'IT' and salary is above and equal to 60k. create table employees1122 ( employee_Id INT primary key, employee_name varchar2(50) null, department varchar2(30) null, salary decimal(10,2) check (salary >= 12000) ); insert into employees1122 values(10223946,'Sanjeev','Admin',22000); insert into employees1122 values(10323956,'Santhosh','Accounts',21000); insert into employees1122 values(10229346,'Swathi','HR',32000); insert into employees1122 values(10425946,'Surekha','HR',25000); insert into employees1122 values(10525945,'Karthik','Programmer',62000); insert into employees1122 values(10928976,'Sandhya','Operations',42000); insert into employees1122 values(10992946,'Keshav','Testing',42000); insert into employees1122 values(10883946,'Swapna','HR',22000); insert into employees1122 values(10229944,'Sathwik','Programmer',72000); select employee_name, department, salary from employees1122 where department = 'Programmer' and salary > 60000; Assignment: ----------- 1) Write a query to prepare the report with: student_id student_name whose attendance is above 85% and percentage above 80%. 2) Write a query to find products with low stock or zero price. 3) Write query to prepare the report with list of customers from the specific cities. report with: customer_id, customer_name, city whose locations from 'Delhi' and 'Bangalore' Set Operators ============= => The set operators are: 1) union 2) union all 3) intersection 4) minus create table customers_north ( customer_id int, customer_name varchar(50), customer_location varchar(50), age number(2) ); insert into customers_north values(121,'kishore','Mumbai',28); insert into customers_north values(131,'keerthika','Panjab',38); insert into customers_north values(112,'krishna','Gujarat',22); insert into customers_north values(101,'Lavanya','Delhi',28); insert into customers_north values(111,'Lohitha','Delhi',26); create table customers_south ( custmoer_id int, customer_name varchar(50), customer_location varchar(30), age number(2) ); insert into customers_south values(1021,'karthik','Hyderabad',28); insert into customers_south values(1031,'vennela','Chennai',26); insert into customers_south values(1102,'keerthana','Bangalore',29); insert into customers_south values(1001,'Lavanya','Hyderabad',30); insert into customers_south values(1101,'Ravi','Bangalore',31); insert into customers_south values(131,'keerthika','Hyderabad',38); insert into customers_south values(112,'krishna','Chennai',22); select customer_id, customer_name, customer_location from customers_north union select custmoer_id, customer_name, customer_location from customers_south; Assignment: ----------- 1) Write a query to list all product orders from two systems. 2) Write a query to find employees working in both projects. 3) Write a query to find products sold online but not offline.