y*l 发帖数: 334 | 1 write a query to display the number of products, the total product
quantity,highest&lowest value,but the average only for non-continued
products(product status is null).
I wrote like this:
SELECT COUNT(*)'prodNumberOfRows', SUM(prodQtyInv)'prodQtyInvAmount',
MAX(prodQtyInv)'prodhighestQtyInv', MIN(prodQtyInv)'prodLowestQtyInv',
AVG(prodQtyInv)'prodAvgQtyInv'
FROM Product
WHERE prodStatus is null;
However, it turns out that all the results are restricted to the "null" |
|