SQL isn't case-sensitive ( select is the same as SELECT ), but writing keywords in CAPS makes your code easier to read.
SELECT column1, column2 -- Which columns do you want? FROM table_name -- Which table are they in? WHERE condition -- How do you want to filter them? ORDER BY column1 DESC; -- How should the results be sorted? Use code with caution. Copied to clipboard 3. Practice Exercises To practice, imagine a table named : Department Engineering Engineering Exercise 1: The Basics SQL: with practice exercises, Learn SQL Fast
SELECT * FROM Employees WHERE Salary > 75000 ORDER BY Salary DESC; Exercise 3: Aggregates Goal: Find the average salary of all employees. Your Code: SELECT AVG(Salary) FROM Employees; 4. Quick Tips for Success SQL isn't case-sensitive ( select is the same
Get the names of all employees in the 'Engineering' department. WHERE condition -- How do you want to filter them
Always end your statements with a ; to tell the database you're done.