Tag view

#sql

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with sql

13 cards

SQL Easy Theory

Explain ACID

ACID stands for atomicity, consistency, isolation, and durability.

  • Atomicity means all or nothing
  • Isolation controls concurrency visibility
  • Durability survives crashes after commit

Explain ACID

SQL Easy Theory

Explain SQL joins

Joins combine rows from tables based on a related key, with inner and outer joins deciding what unmatched rows survive.

  • INNER keeps matches
  • LEFT keeps all left rows
  • Join condition matters

Explain SQL joins

SQL Easy Theory

Primary key vs foreign key

A primary key uniquely identifies a row in its own table, while a foreign key points to a related row in another table.

  • Primary key is table identity
  • Foreign key creates relationship
  • Helps enforce referential integrity

Primary key vs foreign key

SQL Medium Theory

Subquery vs join

Joins combine tables directly, while subqueries nest one query inside another; either can be correct depending on clarity and plan quality.

  • Joins are often easier to optimize
  • Subqueries can express stepwise logic
  • Check the execution plan

Subquery vs join

SQL Easy Theory

What does GROUP BY do?

GROUP BY collects rows by one or more columns so aggregate functions can run per group.

  • Works with count sum avg
  • Every selected non-aggregate column must be grouped
  • HAVING filters groups

What does GROUP BY do?