Quote:
Originally Posted by simon47
the customer table is missing from the code section...customer table isnt mentioned anywhere in code?
|
Why would it need to be? Your query specifies to find products that haven't been bought by customers. Since customers doesn't have any direct relationship to product, there's no need to include the customers table as anything not bought will not have a reference within the sales table.
So all you need to find is anything within the product table that has no related record within sales. Since the product has never been sold, there is no reason to collect any Customer information from it.
This is clearly homework as well, so he really shouldn't have given you the answer to the third one. The first two are simply aggregates and groups.
This is also access, which is. . . not great SQL wise. MySQL code will not run properly within it for two reasons: the functions are different for anything proprietary, and Access is incredibly easy to confuse if you start joining more than two tables together.
So this belongs in the other databases section.