SQL Questions 7 total
SQL ×
0
0
answers
1What is MongoDB aggregation pipeline?
The aggregation pipeline processes documents through a sequence of stages, similar to SQL's GROUP BY + JOINs.
**Common stages:**
- `` — f...
0
0
answers
2What is SQL injection and how do you prevent it?
SQL injection is an attack where malicious SQL code is inserted into an input field to manipulate the database.
**Example attack:**
```
Use...
0
0
answers
3What is the difference between AWS RDS and DynamoDB?
**RDS (Relational Database Service):**
- Managed SQL databases: MySQL, PostgreSQL, Oracle, SQL Server
- Structured data with fixed schema
- ...
0
0
answers
4How do you find duplicate rows in SQL?
```sql
-- Find duplicates by email
SELECT email, COUNT(*) as count
FROM users
GROUP BY email
HAVING COUNT(*) > 1;
-- Delete duplicates, kee...
0
0
answers
5What is the difference between WHERE and HAVING in SQL?
**WHERE** filters rows BEFORE grouping
**HAVING** filters groups AFTER GROUP BY
```sql
-- WHERE: filter individual rows
SELECT * FROM emplo...
0
0
answers
6What is the difference between INNER JOIN and LEFT JOIN in SQL?
**INNER JOIN** — returns only rows where there is a match in BOTH tables
**LEFT JOIN** — returns ALL rows from the left table + matching...
0
0
answers
7What is the difference between SQL and NoSQL databases?
**SQL (Relational):** MySQL, PostgreSQL, SQLite
- Structured tables with fixed schema
- ACID compliant (reliable transactions)
- Best for co...