由买买提看人间百态

topics

全部话题 - 话题: prodqtyinv
(共0页)
y*l
发帖数: 334
1
来自主题: Database版 - help: simple query!(菜鸟上路)
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"
(共0页)