Below you will find pages that utilize the taxonomy term “Sql”
Postsread more
That Don't Make Sense, SQL
One of the things that baffles me with SQL is how some things make complete sense, but when you apply the same logic, it just doesn’t work. For example:
select *
from payments
where amount > 20;
This works and it makes sense that it works. Then you try this:
select *
from payments
where avg(amount);
And you get a grouping error. Which makes no sense. Why shouldn’t you be able to make that work? Instead, you have to write it as a subquery.