Q41. Correct GROUP BY syntax?
```sql SELECT name, COUNT(name) FROM customers GROUP BY name; ``` In standard SQL (and MySQL 5.7+ with `ONLY_FULL_GROUP_BY`), any non-aggregated column in SELECT must app...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (115 available).
```sql SELECT name, COUNT(name) FROM customers GROUP BY name; ``` In standard SQL (and MySQL 5.7+ with `ONLY_FULL_GROUP_BY`), any non-aggregated column in SELECT must app...
| WHERE | HAVING | |-------|--------| | Filters **rows** | Filters **groups** | | Executes **before** GROUP BY | Executes **after** GROUP BY | | Cannot use aggregates | C...
A **`JOIN`** clause in SQL combines rows from two or more tables based on a related column between them (typically a Foreign Key referencing a Primary Key). ### The Need ...
The **`INNER JOIN`** is the most widely used type of join in relational database systems. In fact, `INNER` is the default join type in standard SQL—writing `FROM A JOIN B...
1. **INNER JOIN** — matching rows only 2. **LEFT (OUTER) JOIN** — all left + matched right 3. **RIGHT (OUTER) JOIN** — all right + matched left 4. **FULL OUTER JOIN** — a...
The `ON` clause specifies the join condition. It improves readability over the old comma-syntax, supports multi-column joins (`ON a.id = b.id AND a.type = b.type`), and i...
An **`INNER JOIN`** returns only the subset of rows where the join predicate (`ON` condition) matches in **both** tables simultaneously: ### Visual Venn Diagram Concept: ...
Yes. There's no practical limit (though performance degrades with many joins). ```sql SELECT f.name, d.name AS division, c.name AS country FROM faculty f INNER JOIN divis...
Yes — **SELF JOIN**. You must use aliases to distinguish the two instances. ```sql SELECT a.name AS employee, b.name AS manager FROM employees a, employees b WHERE a.mana...
A Cartesian product occurs when tables are joined **without a condition**. Every row in Table A pairs with every row in Table B: `m × n` rows total. It's usually a bug, b...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.