1. SQL Chip
The IN operator is your shortcut for "OR" logic. Instead of writing multiple WHERE clauses for the same column, IN lets you pass a clean list of values. It keeps your code readable and reduces the chance of syntax errors when checking against several categories at once.
2. SQL Chunk
When you don't know the exact value but know a piece of it, LIKE is your best friend. Combining it with % (multiple characters) or _ (one character) allows for powerful pattern matching.
SELECT
name,
department,
email
FROM employees
WHERE name LIKE 'J%'
OR email LIKE '%@company.com'
ORDER BY name ASC
LIMIT 10;3. SQL Challenge
Let's level up. What if you need to find leaders within specific high-impact departments? We can combine the list-matching power of IN with the pattern-matching flexibility of LIKE.
Your Goal: Find all employees who are either a 'Manager' or 'Director' AND whose department starts with the word 'Tech'.
SELECT
name,
job_title,
department
FROM employees
WHERE job_title IN ('Manager', 'Director')
AND department LIKE 'Tech%'
ORDER BY department DESC;4. SQL Mistake: The "Equals NULL" Trap
In SQL, NULL represents an "unknown" value, not a zero or an empty string. Because NULL is unknown, you cannot use = to find it. If you ask SQL if "Unknown" equals "Unknown," it simply shrugs.
The Fix: Always use IS NULL or IS NOT NULL.
-- ❌ This will return 0 rows, even if NULLs exist
SELECT name FROM employees WHERE department = NULL;
-- ✅ This is the correct way to find missing data
SELECT
name,
job_title
FROM employees
WHERE department IS NULL
ORDER BY name;5. SQL in Practice: E-commerce Order Analysis
In the world of E-commerce, management often needs to see which product categories are driving the most revenue, but only for completed transactions. Here, we use GROUP BY to collapse thousands of rows into a clean summary.
SELECT
category_name,
COUNT(order_id) AS total_orders,
SUM(order_amount) AS total_revenue
FROM sales_data
WHERE status IN ('Shipped', 'Delivered')
GROUP BY category_name
HAVING SUM(order_amount) > 5000
ORDER BY total_revenue DESC;6. SQL Resource: Data Engineer Academy (Free & Paid Resources)
If you’re ready to go deeper into SQL and data pipelines, the Data Engineering Academy is a top-tier, project-based program that teaches real-world SQL—including window functions, analytics, and much more. It’s perfect for anyone looking to level up from beginner to job-ready data roles like data analyst or data engineer.
Start here with my referral link: Data Engineer Academy


