SELECT * FROM users WHERE email = 'john@example.com';
Filters records based on the given condition.
SELECT * FROM users WHERE email = 'john@example.com' AND name = 'John Doe';
This fetches records matching both conditions.
SELECT * FROM users ORDER BY created_at DESC;
Sorts records in descending order by creation date.
UPDATE users SET name = 'Jane Doe' WHERE id = 1;
Updates the name of a user with ID 1.
DELETE FROM users WHERE id = 1;
Deletes the record where the ID is 1.
SELECT users.name, orders.amount FROM users JOIN orders ON users.id = orders.user_id;
This retrieves user names along with their order amounts by joining users and orders tables.