Section weight: Typically 5–10 marks.
GROUP BY+HAVINGand subqueries appear in almost every paper.
This folder covers SQL querying and PL/SQL programming for TCS IPA.
| File | Content |
|---|---|
SQL-COMPLETE-GUIDE.md |
Full reference — DDL, DML, joins, subqueries, aggregate functions, PL/SQL blocks, cursors |
sql_plsql_notes.md |
Concise revision notes |
| Topic | Why It Matters |
|---|---|
GROUP BY + HAVING |
Almost always tested — filter aggregated results |
JOIN types (INNER, LEFT, RIGHT, FULL) |
Frequently asked with diagram-based MCQs |
| Subqueries | Correlated vs non-correlated, IN, NOT IN, EXISTS |
| Aggregate functions | COUNT, SUM, AVG, MAX, MIN |
ORDER BY |
Ascending (default) vs descending |
PL/SQL IF/ELSIF/ELSE |
Decision logic in stored blocks |
| Cursors | Implicit vs explicit, OPEN, FETCH, CLOSE |
SAVEPOINT / ROLLBACK |
Transaction control — mark intermediate points |
-- Find departments with more than 3 employees
SELECT dept, COUNT(*) AS total
FROM employees
GROUP BY dept
HAVING COUNT(*) > 3;
-- Second highest salary
SELECT MAX(salary)
FROM employees
WHERE salary < (SELECT MAX(salary) FROM employees);