I'm looking at the example
SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers
ON Orders.CustomerID=Customers.CustomerID;
from W3Schools and am wondering how I'm supposed to group the clauses in my mind. From what I understand, every SQL query returns a table, and clauses within the query may themselves return a table. So I think of the whole
Orders INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID
as being a table and I'm returning a sub-table of it by applying SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
to it. Is that the right way to think about things?