Let's read a query with two combined conditions and confirm exactly why one row matches and another doesn't.
SELECT * FROM students WHERE age > 15 AND name = "Sara"; requires BOTH conditions to be true for a row to appear in the result. Sara satisfies both: her age (17) is greater than 15, and her name is exactly "Sara" so her row is included.
Ali's row is excluded, even though his age (16) also satisfies age > 15, because his name does not equal "Sara" and AND requires every condition to hold, not just some of them.
If this query had used OR instead of AND, both students would have been included, since Ali's age alone (16 > 15) would already satisfy one of the two conditions.
This is exactly why choosing AND versus OR carefully matters: they can produce completely different result sets from the same two individual conditions. Always ask yourself "do I need every condition to hold, or just one of them?" before writing the query.
