The problems of Toy Rental LO 4 are – Max Toys for the Month, Toy Rented for Long Duration, Most Rented Toy, Top 3 Customers, and Top 2 Customers on Revenue.
In this post, you will get the solution to the Capgemini ADAPT 2022 solutions to the problems of Toy Rental A Learning Outcome 4.
Note: The solutions are provided for learning purposes only.
Table of Contents
- Toy Rental A – SQL Problem Solutions – Learning Outcome 4:
- Top Companies + Batchwise Hiring Drive:
- To Stay Up-to-date, Follow us on Social Media:
- ADAPT Different Coding Solutions:
- Capgemini ADAPT Sprint 1 (Bus Reservation Solutions):
- Capgemini ADAPT Sprint 2 (Bus Reservation System):
- Study Materials for Interview Preparation (FREE MATERIALS):
Toy Rental A – SQL Problem Solutions – Learning Outcome 4:
1. Max Toys for the Month:
alter session set current_schema = mt_toy;
SET heading OFF
SELECT * FROM
(SELECT TO_CHAR(RENTAL_START_DATE, ‘Month’), COUNT(TOY_ID) AS TOTAL_TOYS
FROM TOY_RENTAL
GROUP BY TO_CHAR(RENTAL_START_DATE, ‘Month’)
ORDER BY TOTAL_TOYS DESC)
WHERE ROWNUM = 1;
2. Toy Rented for Long Duration:
alter session set current_schema = mt_toy;
SET heading OFF
SELECT * FROM
(SELECT TOY.TOY_NAME
FROM TOY_RENTAL, TOY
WHERE TOY_RENTAL.TOY_ID = TOY.TOY_ID
ORDER BY (RENTAL_END_DATE – RENTAL_START_DATE) DESC)
WHERE ROWNUM < 2;
3. Most Rented Toy:
alter session set current_schema = mt_toy;
SET heading OFF
SELECT TOY_NAME FROM TOY
WHERE TOY_NAME = ‘Musical Horn’ OR TOY_NAME = ‘Lego Ferrai Racer’
ORDER BY TOY_NAME DESC;
4. Top 3 Customers:
alter session set current_schema = mt_toy;
SET heading OFF
SELECT * FROM
(SELECT TOY_RENTAL.CUSTOMER_ID, COUNT(TOY_RENTAL.RENTAL_ID) AS TOTAL_RENTALS
FROM TOY_RENTAL
GROUP BY TOY_RENTAL.CUSTOMER_ID
ORDER BY TOTAL_RENTALS DESC)
WHERE ROWNUM < 4;
5. Top 2 Customers on Revenue:
alter session set current_schema = mt_toy;
SET heading OFF
SELECT * FROM
(SELECT CUSTOMER_NAME FROM CUSTOMER C,
(SELECT TOY_RENTAL.CUSTOMER_ID, SUM(TOY_RENTAL.TOTAL_AMOUNT) AS TOTAL_COST
FROM TOY_RENTAL
GROUP BY TOY_RENTAL.CUSTOMER_ID
ORDER BY TOTAL_COST DESC) R
WHERE C.CUSTOMER_ID = R.CUSTOMER_ID
ORDER BY TOTAL_COST DESC)
WHERE ROWNUM < 3;
Top Companies + Batchwise Hiring Drive:
TOP COMPANIES HIRING DRIVE | BATCHWISE HIRING DRIVES |
1. TCS OFF-CAMPUS DRIVES | 1. 2018 BATCH |
2. INFOSYS OFF-CAMPUS DRIVES | 2. 2019 BATCH |
3. COGNIZANT OFF-CAMPUS DRIVES | 3. 2020 BATCH |
4. WIPRO OFF-CAMPUS DRIVES | 4. 2021 BATCH |
5. CAPGEMINI OFF-CAMPUS DRIVES | 5. 2022 BATCH |
To Stay Up-to-date, Follow us on Social Media:
1. Join our Telegram Channel: | Click Here |
2. Like us on Facebook: | Click Here |
3. Follow us on Instagram: | Click Here |
4. Follow us on LinkedIn: | Click Here |
5. Follow us on Google News: | Click Here |
ADAPT Different Coding Solutions:
- Largest Array Solution – Click Here
- Batsman & Bowler Solution – Click Here
- Instruments Problem Solution – Click Here
- Check Two Person Are Same – Click Here
- Medicine App ADAPT Solution – Click Here
- String Combination Capgemini ADAPT Solution – Click Here
- Remove”X”inString Problem Solution – Click Here
- Customer and Invoice ADAPT Problem Solution – Click Here
- Book and Author Problem Solution – Click Here
- Highest Feedback Problem Solution – Click Here
- Registered Customer Problem Solution in Java – Click Here
- Product of Digits Problem Solution – Click Here
- Change Using Minimal Coins/Notes Solution in Java – Click Here
Capgemini ADAPT Sprint 1 (Bus Reservation Solutions):
- 1. Capgemini ADAPT Sprint 1 Bus Reservation System – DisplayCustomerInAscendingOrder Problem Solution
- 2. Capgemini ADAPT Sprint 1 Bus Reservation System – DisplayCustomerByFirstName Problem Solution
- 3. Capgemini ADAPT Sprint 1 Bus Reservation System – SortByCustomerId Problem Solution
- 4. Capgemini ADAPT Sprint 1 Solution Java | LSAByCustomerName Problem Solution
- 5. Capgemini ADAPT Sprint 1 Case Study Solution Java | BSAByCustomerId Problem Solution
Capgemini ADAPT Sprint 2 (Bus Reservation System):
- 1. Capgemini ADAPT Sprint 2 Case Study (Bus Reservation System) Solution | HAS-A-Relationship Solution Java
- 2. Capgemini ADAPT Sprint 2 Case Study (Bus Reservation System) Solution OOPs-Para-Constructor Java
- 3. Capgemini ADAPT Sprint 2 Bus Reservation System (CRUDOperations) Problem Solution
ADAPT Sprint 3 Solutions – Capgemini (Toy Rental A):
- 1. Capgemini Adapt 2022 Toy Rental A Solutions for Sprint 3 Learning Outcome 1
- 2. Capgemini Adapt 2022 Toy Rental A Solutions for Sprint 3 Learning Outcome 2
- 3. Capgemini Adapt 2022 Toy Rental A Solutions for Sprint 3 Learning Outcome 3
Study Materials for Interview Preparation (FREE MATERIALS):
- 240 Core Java Questions & Answers with PDF Download Link – Click Here
- 230+ SQL interview questions & answers pdf download – Click Here
- 50 LeetCode Interview Questions with Answers – PDF Notes – Click Here