> Can you tell whether this will return exactly one line for each customer ?
I can tell it will return one row for each Customer.B.
If Customer.B is a candidate key of Customer, that will also be one eow per Customer.
> If INNER JOIN + GROUP BY was the dedicated construct to do so
The dedicated construct to say what you want one row per is GROUP BY. Yes, it operates by columns, not tables, so what it means in table terms is schema-dependent.
> each value of column Customer.A must also appear in column Sales
Well, yes, that’s what INNER JOIN means. The dedicated construct to assure that every row from the first source but not the second source table is included in the result set before filtering by WHERE is LEFT [OUTER] JOIN.
I can tell it will return one row for each Customer.B.
If Customer.B is a candidate key of Customer, that will also be one eow per Customer.
> If INNER JOIN + GROUP BY was the dedicated construct to do so
The dedicated construct to say what you want one row per is GROUP BY. Yes, it operates by columns, not tables, so what it means in table terms is schema-dependent.
> each value of column Customer.A must also appear in column Sales
Well, yes, that’s what INNER JOIN means. The dedicated construct to assure that every row from the first source but not the second source table is included in the result set before filtering by WHERE is LEFT [OUTER] JOIN.