PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

SQL · Theory

first()

← All stacks

Theory

124/439

first()

first() is simple if you keep it on paper. Zara uses it for a first dry-run in a viva board.

first() order — meaning → one first step Zara can write from memory → one limit. Dumping ten features helps nobody.

Without first(), a viva board gets messy and a first dry-run is hard to trust.

Use first() when a first dry-run must stay clear. If a simpler SQL step works, use that instead.

first() trap — only reciting the name of first. Zara loses marks for that every viva.

After first(), Zara should still remember only reciting the name of first.

Viva for first(): what it is → one first step Zara can write from memory → the mistake (only reciting the name of first).

Exam tip

Say first() in one breath, then one first step Zara can write from memory, then only reciting the name of first.

first() — sample query

-- first()
CREATE TABLE demo (
  id INTEGER PRIMARY KEY,
  label TEXT NOT NULL,
  qty INTEGER DEFAULT 0
);
INSERT INTO demo (id, label, qty) VALUES
  (1, 'alpha', 2),
  (2, 'beta', 5);
SELECT label, qty FROM demo WHERE qty >= 2 ORDER BY qty DESC;

first(): create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Short notes

  • Deffirst() — Zara uses it for a first dry-run in a viva board.
  • Rulefirst() → one first step Zara can write from memory.
  • Rememberfirst() + an index (a viva board).
  • Usefirst() in a viva board (a first dry-run).
  • Trapfirst() — only reciting the name of first.
  • Exfirst() → a first dry-run.

Questions

1

What is first()? Teach it with a first dry-run.

2

If you skip first(), what breaks in a viva board?

3

Viva: one wrong answer people give for first().

4

Write the smallest first() step on a first dry-run. What happens?

Previous← GROUP_CONCAT()Nextlast() →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.