Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

having in mysql

SELECT 
    ordernumber,
    SUM(quantityOrdered) AS itemsCount,
    SUM(priceeach*quantityOrdered) AS total
FROM
    orderdetails
GROUP BY 
   ordernumber
HAVING 
   total > 1000;
Source by www.mysqltutorial.org #
 
PREVIOUS NEXT
Tagged: #mysql
ADD COMMENT
Topic
Name
5+2 =