# Capgemini ADAPT 2022 – Toy Rental A (Based on Rental, Based on Price Quantity, Based on Quantity) Solutions

The problems of  Toy Rental LO 2 are – Toys based on Rental, Toys based on Price Quantity, and Toys based on Quantity. In this post, you will get the solution to the Capgemini ADAPT 2022 solutions to the problems of Toy Rental A Learning Outcome 2.

Note: The solutions are provided for learning purposes only.

## Toy Rental A – SQL Problem Solutions – Learning Outcome 2:

### 1. Toys Based on Rental:

alter session set current_schema = mt_toy;

SELECT CUSTOMER_NAME
FROM CUSTOMER C, (SELECT CUSTOMER_ID, COUNT(CUSTOMER_ID) FROM TOY_RENTAL R
GROUP BY CUSTOMER_ID
HAVING COUNT(CUSTOMER_ID) > 2) R
WHERE C.CUSTOMER_ID = R.CUSTOMER_ID AND ROWNUM < 3;

### 2. Toys Based on Price Quantity:

alter session set current_schema = mt_toy;

SELECT * FROM TOY
WHERE PRICE > 145 AND QUANTITY = 5;

### 3. Toys Based on Quantity:

alter session set current_schema = mt_toy;

SELECT * FROM TOY
WHERE QUANTITY BETWEEN 20 AND 50;

## Top Companies + Batchwise Hiring Drive:

 TOP COMPANIES HIRING DRIVE BATCHWISE HIRING DRIVES