Add experienced-2-3y module: 31 scenario questions (core Java, collections/streams, concurrency, Spring Boot 4.2, JPA N+1, REST problem details, SQL) with 7 asserting tests and 8 transcripts

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6u469kis46DspusiL
This commit is contained in:
Ankur Mhatre
2026-11-22 02:01:04 +05:30
co-authored by Claude Sonnet 5.5
parent 4180e746ef
commit 76012dd8c3
36 changed files with 1401 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
data: employee salaries are 120000, 120000, 90000, 80000, 70000 (two people tie for the top)
== Q28: second highest salary ==
ORDER BY salary DESC OFFSET 1 (no DISTINCT) -> 120000 <- the tie makes this the top salary again
SELECT DISTINCT ... OFFSET 1 -> 90000
MAX(salary) WHERE salary < MAX(salary) -> 90000
DENSE_RANK() = 2 -> 90000
== Q29: duplicates ==
emails seen more than once:
[email protected] x3
[email protected] x2
DELETE ... NOT IN (SELECT MIN(id) ... GROUP BY email) removed 3 rows; left: [1, 2, 4]
== Q30: INNER vs LEFT JOIN, COUNT(*) vs COUNT(col), WHERE vs ON ==
departments (id 30 'Ops' has no employees)
INNER JOIN departments returned: 2 LEFT JOIN: 3
Ops: COUNT(*) = 1, COUNT(e.id) = 0 <- COUNT(*) counts the NULL-extended row
LEFT JOIN + WHERE e.salary > 100000 keeps 2 departments; the same filter in ON keeps 3
== Q31: what an index changes in the plan ==
without an index: SELECT "PUBLIC"."BIG_SIGNUP"."ID", "PUBLIC"."BIG_SIGNUP"."EMAIL" FROM "PUBLIC"."BIG_SIGNUP" /* PUBLIC.BIG_SIGNUP.tableScan */ WHERE "EMAIL" = '[email protected]'
with idx_big_email: SELECT "PUBLIC"."BIG_SIGNUP"."ID", "PUBLIC"."BIG_SIGNUP"."EMAIL" FROM "PUBLIC"."BIG_SIGNUP" /* PUBLIC.IDX_BIG_EMAIL: EMAIL = '[email protected]' */ WHERE "EMAIL" = '[email protected]'