TGViewer
SQL Programming Resources SQL Programming Resources @sqlanalyst ยท 76.7K subscribers
Post #2709 2.6K
๐Ÿง  Common Beginner Mistakes

โŒ Mistake 1: Forgetting FROM

Wrong: SELECT customer_name;

Correct: SELECT customer_name FROM customers;

โŒ Mistake 2: Using commas incorrectly

Wrong: SELECT customer_id customer_name city

Correct: Use commas

โŒ Mistake 3: Using quotes around column names unnecessarily

SELECT 'customer_name' treats it as text, not column.

โŒ Mistake 4: Confusing *

SELECT * means return all columns, not all rows.

๐ŸŽฏ Practice Questions

Q1. Display all columns from employees

Q2. Display employee_name, salary, department_id

Q3. Display unique cities from customers

Q4. Display product_name, price and 15% discounted price

Q5. Display product_name, selling_price, cost_price and profit

Q6. Display customer names with alias Customer

Q7. Display employee name and salary increased by 10%

โœ… Answers

-- A1
SELECT * FROM employees;

-- A2
SELECT employee_name, salary, department_id FROM employees;

-- A3
SELECT DISTINCT city FROM customers;

-- A4
SELECT product_name, price, price * 0.85 AS discounted_price FROM products;

-- A5
SELECT product_name, selling_price, cost_price, selling_price - cost_price AS profit FROM products;

-- A6
SELECT customer_name AS Customer FROM customers;

-- A7
SELECT employee_name, salary, salary * 1.10 AS increased_salary FROM employees;


๐Ÿ’ผ Interview Questions

1. What does SELECT do? โ†’ Retrieves data from columns.

2. What does SELECT * mean? โ†’ Retrieves all columns.

3. What is DISTINCT? โ†’ Removes duplicate combinations.

4. What is an alias? โ†’ Temporary name for clarity.

5. Can SQL perform calculations? โ†’ Yes, arithmetic expressions directly in queries.

Double Tap โค๏ธ For Part-3
  • โค 12
More from @sqlanalyst
  1. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  2. Oct 7, 2026SQL Interview Series โ€” Part 4 ๐Ÿ“Œ Question 4: Find the Highest Salary in Each Department Suโ€ฆ
  3. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  4. Sep 29, 2026SQL Interview Series โ€” Part 2 ๐Ÿ“Œ Question 2: Find Duplicate Records Suppose you have an Emโ€ฆ
  5. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
  6. Sep 29, 2026SQL Interview Series โ€” Part 1 Hi guys, let's start a SQL interview series covering frequenโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’