In this post, we have tried to provide solutions to the problems of Capgemini ADAPT 2022 Book Rental A (Books Rented on Given Date, Current Month Users Details, User Details of Book Rental, Maximum Book Availed by the User, Books Availed by Most of the Users, Users Rented Neural Networks Book, Book not returned by the User, User & Rental Information, All User’s & Rental Information, Maximum Rent for the Month). These problems are from Capgemini ADAPT Program 2022. We have provided the solutions to the Problems noted below –
- BRL3-1 Books Rented on Given Date
- BRL3-2 Current Month Users Details
- BRL3-3 User Details of Book Rental
- BRL3-4 Maximum Book Availed by the User
- BRL3-5 Books Availed by Most of the Users
- BRL3-6 Users Rented Neural Networks Book
- BRL3-7 Book not returned by the User
- BRL3-8 User & Rental Information
- BRL3-9 All User’s & Rental Information
- BRL3-10 Maximum Rent for the Month
Note: The solutions are provided for your reference only. During the assessment, you are requested to not use any malpractices, rather than solve all the problems on your own. We do not encourage candidates to fall into any malpractice.
Table of Contents
-
Book Rental A Problem Solutions:
- 1.BRL3-1 Books Rented on Given Date Problem Solution:
- 2. BRL3-2 Current Month Users Details Problem Solution:
- 3. BRL3-3 User Details of Book Rental Problem Solution:
- 4. BRL3-4 Maximum Book Availed by the User Problem Solution:
- 5. BRL3-5 Books Availed by Most of the Users Problem Solution:
- 6. BRL3-6 Users Rented Neural Networks Book Problem Solution:
- 7. BRL3-7 Book not returned by the User Problem Solution:
- 8. BRL3-8 User & Rental Information Problem Solution:
- 9. BRL3-9 All User’s & Rental Information
- 10. BRL3-10-Maximum Rent for the Month Problem Solution:
- 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):
- ADAPT Sprint 3 Solutions – Capgemini (Toy Rental A):
- Online Shopping A Solutions Using Java:
Book Rental A Problem Solutions:
1.BRL3-1 Books Rented on Given Date Problem Solution:
Display the books which were rented out on 20/11/2020
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT *
FROM book
WHERE book_id in (SELECT book_id
FROM book_rental
WHERE to_char(rental_start_date, ‘DD-MM-YYYY’) = ’20-11-2020′);
2. BRL3-2 Current Month Users Details Problem Solution:
List the users who have availed of the books a current month.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT *
FROM user_details
WHERE user_id in (SELECT user_id
FROM ook_rental
WHERE to_char(rental_start_date, ‘MON’)=’DEC’);
3. BRL3-3 User Details of Book Rental Problem Solution:
Display all the users who have rented at least 1 book with details of the book & rental return date.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT first_name, title, rental_end_date
FROM user_details a, book_rental b, book c
WHERE a.user_id = b.user_id(+) AND b.book_id = c.book_id;
4. BRL3-4 Maximum Book Availed by the User Problem Solution:
Fetch the first_name of the user who has availed a maximum number of books for rental during the current fiscal.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT first_name
FROM user_details
WHERE user_id = (SELECT *
FROM (SELECT user_id
FROM book_rental GROUP BY user_id
ORDER BY count(*) desc)
WHERE rownum <= 1);
5. BRL3-5 Books Availed by Most of the Users Problem Solution:
Fetch the book which was availed for rent by most users.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT * FROM book WHERE
book_id = (SELECT*FROM
(SELECT book_id
FROM book_rental
GROUP BY book_id
ORDER BY count(book_id) desc)
WHERE rownum <= 1);
6. BRL3-6 Users Rented Neural Networks Book Problem Solution:
Identify the users who have opted for a book named ‘Neural Networks’.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT * FROM user_details
WHERE user_id in(
SELECT a.user_id
FROM book_rental a, book b, user_details c
WHERE b.book_id = a.book_id
AND c.user_id = a.user_id
AND b.title = ‘Neural Networks’);
7. BRL3-7 Book not returned by the User Problem Solution:
Fetch the user information who has not returned the books after the rental period.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT * FROM user_details
WHERE user_id in (SELECT user_id
FROM book_rental
WHERE isreturned = ‘no’ );
8. BRL3-8 User & Rental Information Problem Solution:
Display the user’s first_name, book title, and the rental end date of the book for the rental id/s which was rented on 25th Nov 2020.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT ud.first_name, bk.title, br.rental_end_date
FROM user_details ud, book bk, book_rental br
WHERE ud.user_id = br.user_id
AND br.book_id = bk.book_id
AND to_char(br.rental_start_date, ‘dd/mm/yy’) = ’25/11/20′;
9. BRL3-9 All User’s & Rental Information
Display all the user’s first name, book title, rental start date, and rental end date for all users with the rental details even if they don’t avail any books for rental and sort the output on first_name.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT ud.first_name, bk.title, br.rental_start_date, br.rental_end_date
FROM user_details ud, book bk, book_rental br
WHERE ud.user_id = br.user_id(+)
AND br.book_id = bk.book_id(+)
ORDER BY ud.first_name;
10. BRL3-10-Maximum Rent for the Month Problem Solution:
Display first name, city, and total rent amount of the month for the user whose rental amount is maximum for the month.
Solution:
alter session set current_schema = bookrental;
SET heading OFF
SELECT *
FROM (SELECT first_name, city, SUM(total_amount)
FROM book_rental be, user_details ud
WHERE br.user_id = ud.user_id AND br.rental_start_date like ‘%DEC%’
GROUP BY ud.first_name, ud.city
ORDER BY SUM(total_amount) desc)
WHERE rownum = 1;
BOOK RENTAL A ALL SOLUTIONS | CLICK HERE |
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
- 4. Capgemini Adapt 2022 Toy Rental A Solutions for Sprint 3 Learning Outcome 4
Online Shopping A Solutions Using Java:
- 1. Capgemini ADAPT 2022 Online Shopping A – Display Products Solution using JAVA – Click Here
- 2. Capgemini ADAPT 2022 Online Shopping A – Products by Category Solution using JAVA – Click Here
- 3. Capgemini ADAPT 2022 Online Shopping A – Customer Array Solution using JAVA – Click Here
- 4. Capgemini ADAPT 2022 Online Shopping A – Search Customers by Name Solution using JAVA – Click Here
- 5. Capgemini ADAPT 2022 Online Shopping A – Search Customers by City Solution using JAVA – Click Here
- 6. Online Shopping A – Customer & Address Class Solution | Capgemini ADAPT 2022 Solutions – Click Here