Worksheets › Class 12 › Querying and SQL Functions › Cheat sheet

Class 12 Querying and SQL Functions: cheat sheet

CBSE Informatics Practices. MySQL functions and grouping: math, text and date functions, aggregate functions, GROUP BY with HAVING, ORDER BY, and Cartesian products and equi-joins of two tables.

Open the printable cheat sheetPractice worksheet

Key ideas

Remember

ROUNDROUND(912.564, 2) → 912.56; ROUND(912.565, 2) → 912.57; ROUND(912.5, 0) → 913
MOD, POWERMOD(47, 5) → 2; POWER(3, 4) → 81
TextMID('Keyboard', 3, 4) → yboa; LEFT('Network', 3) → Net; INSTR('Database', 'BAS') → 5
DatesMONTH('2026-03-14') → 3; MONTHNAME → March; DAYNAME → Saturday
AVG of whole numbersfour decimals: AVG of 78, 81, 79 and 79 → 79.2500
Clause orderSELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY
Equi-joinSELECT Name, ClubName FROM STUDENT, CLUB WHERE STUDENT.ClubId = CLUB.ClubId;
Cartesian product A × Bdegree = columns of A + columns of B; cardinality = rows of A × rows of B

Watch out

Worked example

Write the output of: SELECT LOWER(RIGHT('Software', 2));

Working: RIGHT gives re; LOWER makes it small letters

Answer: re

Practise Querying and SQL Functions

Revise with this page, then practise: every Querying and SQL Functions sheet in the app is new, with an answer key and working.

Coming soon for Android and iPhone.