CREATE TABLE EMP (EMPNO NUMBER(4) PRIMARY KEY,ENAME VARCHAR2(10),JOB VARCHAR2(9),MGR NUMBER(4),HIREDATE DATE,SAL NUMBER(7,2),COMM NUMBER(7,2),DEPTNO NUMBER(2));
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7369, 'SMITH', 'CLERK', 7902, '17-DEC-80', 800, NULL, 20);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7499, 'ALLEN', 'SALESMAN', 7698, '20-FEB-81', 1600, 300, 30);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7521, 'WARD', 'SALESMAN', 7698, '22-FEB-81', 1250, 500, 30);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7566, 'JONES', 'MANAGER', 7839, '02-APR-81', 2975, NULL, 20);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7654, 'MARTIN', 'SALESMAN', 7698, '28-SEP-81', 1250, 1400, 30);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7698, 'BLAKE', 'MANAGER', 7839, '01-MAY-81', 2850, NULL, 30);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7782, 'CLARK', 'MANAGER', 7839, '09-JUN-81', 2450, NULL, 10);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7788, 'SCOTT', 'ANALYST', 7566, '19-APR-87', 3000, NULL, 20);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7839, 'KING', 'PRESIDENT', NULL, '17-NOV-81', 5000, NULL, 10);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7844, 'TURNER', 'SALESMAN', 7698, '08-SEP-81', 1500, 0, 30);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7876, 'ADAMS', 'CLERK', 7788, '23-MAY-87', 1100, NULL, 20);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7900, 'JAMES', 'CLERK', 7698, '03-DEC-81', 950, NULL, 30);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7902, 'FORD', 'ANALYST', 7566, TO_DATE('03-DEC-81', 'DD-MON-RR'), 3000, 20, 20);
INSERT INTO EMP (EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES (7934, 'MILLER', 'CLERK', 7782, TO_DATE('23-JAN-82', 'DD-MON-RR'), 1300, 10, 10);
CREATE TABLE DEPT (DEPTNO NUMBER(2) PRIMARY KEY,DNAME VARCHAR2(14),LOC VARCHAR2(13));
INSERT INTO DEPT (DEPTNO, DNAME, LOC) VALUES (10, 'ACCOUNTING', 'NEW YORK');
INSERT INTO DEPT (DEPTNO, DNAME, LOC) VALUES (20, 'RESEARCH', 'DALLAS');
INSERT INTO DEPT (DEPTNO, DNAME, LOC) VALUES (30, 'SALES', 'CHICAGO');
INSERT INTO DEPT (DEPTNO, DNAME, LOC) VALUES (40, 'OPERATIONS', 'BOSTON');
![image](https://private-user-images.githubusercontent.com/118343892/271338255-4da768df-84f3-4a8c-85aa-1e184b5d672c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm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T0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZjg0YzUwZTY0MGJmODg3OWNhZjZlNTJhZDRmMGZkNWU5ODIyOTU4YTUyNDY5YTA4ZmRmMzJlNmVlMTk2NDIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.iLfcFYUEWCP5exwM0EQE8agFIrWw5IX9pdKkoGKtEzw)
![image](https://private-user-images.githubusercontent.com/118343892/271338751-e9647973-af79-4a1e-a179-7b284c225d0b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzM4NzUxLWU5NjQ3OTczLWFmNzktNGExZS1hMTc5LTdiMjg0YzIyNWQwYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYWQ5ODFiMDQxOTgxODdlZGNjYWU3MDg2YTVmYzNjZDllMThiYzcwMGQwNDc0MzBmZmE0MmU4NmNmZDgzYTZlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.817wxRfU9SJnTsZMRcrnrRqcqSf4v9jlHBROXBNBWI8)
![image](https://private-user-images.githubusercontent.com/118343892/271338909-6235cc68-e4dd-4965-a696-d94b63b9adfa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzM4OTA5LTYyMzVjYzY4LWU0ZGQtNDk2NS1hNjk2LWQ5NGI2M2I5YWRmYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZTkxYWI2NTYxMjNmZGZiMGNlZTlmMTBkZWRjNjhhNTRlMTk0OTE4ZmQ0MWUwNGI2ZDM3YWUyNTk4YjZjMmEwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.x6a0pYUV-UCLH09j4w54UnEQYkj_5wBTunDGCQykU6k)
Q3) List ename, job of the employees who work in deptno 10 and his/her job is any one of the job in the department ‘SALES’.
![image](https://private-user-images.githubusercontent.com/118343892/271339101-af237eb7-efb2-4a04-8e0b-d6b8997ce0da.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6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tQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNWQzZDg1YzllOGNjMDZhODQ3M2IzNDFkMDM4NzJlNWRhNThlZTIwZTYwMGIxNzBhNWM0NGRiNWI3MDU2YWY1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.-n3ZODtbqwEkL5dThK6HUe2_0fRgmgMIH1L5eyv4tXE)
Q4) Create a view empv5 (for the table emp) that contains empno, ename, job of the employees who work in dept 10.
![image](https://private-user-images.githubusercontent.com/118343892/271339490-4d60f20e-18a0-432a-abfd-0da8334b07e9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzM5NDkwLTRkNjBmMjBlLTE4YTAtNDMyYS1hYmZkLTBkYTgzMzRiMDdlOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02Y2YwZmIyNmE4YTkxZmQ1YWJmZTJkZDNhNTFhOTcwZjQ0ODIxYmQ0Y2E3OGRhNGU3MDg5MTY1YWRiNDg3OTY2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.D4TrYLo5V4wgfqvZ8NCFOHPly1Tq9BipCq7GCi1Gf2E)
![image](https://private-user-images.githubusercontent.com/118343892/271339617-2cc9bbed-e2a9-4566-bf70-fb71e626da08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzM5NjE3LTJjYzliYmVkLWUyYTktNDU2Ni1iZjcwLWZiNzFlNjI2ZGEwOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03YTU1MmRkM2EyOGM1NjdmMjA0NDI0NzQ5YjQzZjRlNDM4ODJmNzQ0MWE5NGMzOGIxYWJmZWUwYzUzNDc0YzlmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.9gXPeHGHgBtIJdqsjNLgq2pLROPUUqRiNwcd1iZga6Q)
Q5) Create a view with column aliases empv30 that contains empno, ename, sal of the employees who work in dept 30. Also display the contents of the view.
![image](https://private-user-images.githubusercontent.com/118343892/271339811-0210d44a-5c6d-4ff6-a2b3-9f0ef1be5cf3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4N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bXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kNmQ4ZTQ3Nzc4MDIwYjUyYjA1ZDhlMjdhNjI0NDUwYjdjM2RlOWFkMjY1MDFmZmUyZGE1NTljMWJlOWQ2NWI1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.v9SAj82dM8o-CftS2GcSMAxGBrvAbBg_2QgZMwJeHHI)
Q6) Update the view empv5 by increasing 10% salary of the employees who work as ‘CLERK’. Also confirm the modifications in emp table
![image](https://private-user-images.githubusercontent.com/118343892/271340210-da284c6e-6627-4237-a92a-69e5d8fdc09f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQwMjEwLWRhMjg0YzZlLTY2MjctNDIzNy1hOTJhLTY5ZTVkOGZkYzA5Zi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYWFjYzEwODQ1MDZlYTUyZjI3MzYzMTJhOWM1NzQ3ZjBmYjE5ODY1MjNmYzJmOWUwMWM3OTZjY2VjNDA0N2U5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.up6Xuwdigz3ZGmy26KlyxPYJGJM-M39V5OgwwKobqUg)
![image](https://private-user-images.githubusercontent.com/118343892/271340362-f5cd1cff-d99e-441e-9c6f-a4b468552a41.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6MTcyMzg1NzQ3OCwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQwMzYyLWY1Y2QxY2ZmLWQ5OWUtNDQxZS05YzZmLWE0YjQ2ODU1MmE0MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ODE0NjU3ZmFjYTIyM2UwOGIxYjMxOTA2Zjc5YzA1OWZiZTBhNmRjNzI0OTVmNDE0YjkwZWU5YzdkNjJhM2IxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.MZW3AmWAcWsHsQu8qZR8WkUMfvMvDhjUGfqYUJ3XY_8)
CREATE TABLE Customer1 (customer_id INT,cust_name VARCHAR(20),city VARCHAR(20),grade INT,salesman_id INT);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3002, 'Nick Rimando', 'New York', 100, 5001);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3007, 'Brad Davis', 'New York', 200, 5001);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3005, 'Graham Zusi', 'California', 200, 5002);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3008, 'Julian Green', 'London', 300, 5002);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3004, 'Fabian Johnson', 'Paris', 300, 5006);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3009, 'Geoff Cameron', 'Berlin', 100, 5003);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3003, 'Jozy Altidor', 'Moscow', 200, 5007);
INSERT INTO Customer1 (customer_id, cust_name, city, grade, salesman_id) VALUES(3001, 'Brad Guzan', 'London', NULL, 5005);
CREATE TABLE Salesman1 (salesman_id INT,name VARCHAR(20),city VARCHAR(20),commission DECIMAL(4,2));
INSERT INTO Salesman1 (salesman_id, name, city, commission) VALUES(5001, 'James Hoog', 'New York', 0.15);
INSERT INTO Salesman1 (salesman_id, name, city, commission) VALUES(5002, 'Nail Knite', 'Paris', 0.13);
INSERT INTO Salesman1 (salesman_id, name, city, commission) VALUES(5005, 'Pit Alex', 'London', 0.11);
INSERT INTO Salesman1 (salesman_id, name, city, commission) VALUES(5006, 'Mc Lyon', 'Paris', 0.14);
INSERT INTO Salesman1 (salesman_id, name, city, commission) VALUES(5007, 'Paul Adam', 'Rome', 0.13);
INSERT INTO Salesman1 (salesman_id, name, city, commission) VALUES(5003, 'Lauson Hen', 'San Jose', 0.12);
Q7) Write a SQL query to find the salesperson and customer who reside in the same city. Return Salesman, cust_name and city.
![image](https://private-user-images.githubusercontent.com/118343892/271340967-c452ad5c-1a03-4b96-acc6-9262689b0174.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzgsIm5iZiI6M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yMDI0MDgxN1QwMTE3NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZDE5OWNlZWNmYTUyODRhYzNkNzRiZWFhZTBjZmE1YTQwY2EyOTc5YzZlYjBmZDQ0OGVlYzQ0ZmEyZGFhMDA1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.a_dgLlVnXw4N7SXmYbxDm3HRaUz5ONm2EkjwwhtbtO0)
Q8) Write a SQL query to find salespeople who received commissions of more than 13 percent from the company. Return Customer Name, customer city, Salesman, commission.
![image](https://private-user-images.githubusercontent.com/118343892/271341282-2c628085-5574-43fc-8864-3d4752eb3663.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzksIm5iZiI6MTcyMzg1NzQ3OSwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQxMjgyLTJjNjI4MDg1LTU1NzQtNDNmYy04ODY0LTNkNDc1MmViMzY2My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYzJkNDdkMjZkNGNjMmVhYTJlNTZmZDMxMDAzOWYzZGUxNzEzNjMwMmZkNWM3ZTJmMWY4OTA4MGVlZjIwMDdhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.d_xEXmGi8LWIvRhMMDvKuGsUzGgd0ADCA_yhNcZzhaI)
![image](https://private-user-images.githubusercontent.com/118343892/271341444-87e9b5f0-3ea2-439f-af92-c2e5833c9e20.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzksIm5iZiI6MTcyMzg1NzQ3OSwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQxNDQ0LTg3ZTliNWYwLTNlYTItNDM5Zi1hZjkyLWMyZTU4MzNjOWUyMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNzViNjU4NzYzODljOGZmMzIzZWZmZDJkYjdjZTA3OTQxZTM3OWIyNjBiZWY0MGI1NWE3Y2E3YzFkOGRiOTA4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.rgtDZWg2aNZL-zRBOD62eV0W5wBzgz6SbzkF3Pe78QQ)
![image](https://private-user-images.githubusercontent.com/118343892/271341692-1c7bdf18-bebd-47be-93a8-83e026886801.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzksIm5iZiI6MTcyMzg1NzQ3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NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mZjE0NjVkMmE2ZTIxMzkyZjljNGFjODkwYjFjNzUzNDNlODYyM2EzZGM2ZTIxYjlmMzA5NGIxNTI5NGU2YTMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.CHQ_sMqt03dWbzN47a9waGHnmvzm3D7baOVwlQE-gZI)
![image](https://private-user-images.githubusercontent.com/118343892/271342121-64237bb4-9958-4b21-a861-6bb8c7d8a4fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzksIm5iZiI6MTcyMzg1NzQ3OSwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQyMTIxLTY0MjM3YmI0LTk5NTgtNGIyMS1hODYxLTZiYjhjN2Q4YTRmZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYmE1NmZiNWEyNzBhZGUzYWYyNWExYjA4MWZlZDhlYTVmMjU3OTg0YmVlYTYzNmVkZTlkY2FlMTlmNTFmNWJhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.EvwCuba_S8RDpTXy6-RiYV8cp89jQji_EmR4Qvla33I)
![image](https://private-user-images.githubusercontent.com/118343892/271342340-528f7953-1c7e-4b89-aece-b91a21752781.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzksIm5iZiI6MTcyMzg1NzQ3OSwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQyMzQwLTUyOGY3OTUzLTFjN2UtNGI4OS1hZWNlLWI5MWEyMTc1Mjc4MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxN1QwMTE3NTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yODUyYjBjMzk0NmI0MjM0ZGFmOGUyMDAyZWVmMzM5ZTBmMzc1MGQyNGEwM2VlODUxODEwMGQxMGM5OTI4OGQ2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.BwIsi_jCuwAGfDDTapZalqLWnoGgqJjZNkVYtNoKX2g)
![image](https://private-user-images.githubusercontent.com/118343892/271342626-c6736840-cc86-42ea-9b1c-3b0004d8bc02.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTc3NzksIm5iZiI6MTcyMzg1NzQ3OSwicGF0aCI6Ii8xMTgzNDM4OTIvMjcxMzQyNjI2LWM2NzM2ODQwLWNjODYtNDJlYS05YjFjLTNiMDAw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