Aptitude · Tech basics

Coding, SQL and Git basics, made easy

💡 The idea

Most basic coding questions are about tracing: follow the code (or the SQL) one line at a time and write down the values as they change.

Read one line→Write the values→Next line→Answer
Tracing code by hand

🧭 The method: 3 steps

  1. OOP: encapsulation (hide data), inheritance (reuse a class), polymorphism (same method, different behaviour).
  2. SQL: WHERE picks the rows, then COUNT counts them and SUM adds a column.
  3. Git: add → commit (save locally) → push (send to the server); pull brings changes down.

🎬 Every kind of question, in pictures

Pick a kind. Guess the answer first, then watch the picture work it out. Tap any step to see it in the picture.

Loading the pictures…

✏️ Worked examples

Example 1. SELECT COUNT(*) FROM orders WHERE amount > 100; amounts 50, 120, 300, 100

  1. Rows above 100: 120 and 300
  2. 100 is not MORE than 100

⚡ Shortcut: 2

⚠️ Where people go wrong

  • “> 100” does not include 100; “>= 100” does.
  • range(3) is 0, 1, 2: three values, not four.
  • commit does not upload: push does.

📌 Remember

  • WHERE → COUNT / SUM
  • range(n) runs n times
  • add · commit · push

🎯 Now you try

Fresh questions every time, with the full solution. Pick a level and go.

Loading questions…

⏱️ Take a 10-question timed test: Coding, SQL and Git basics