These are chat archives for eysteinn13/FraunhoferDBWebsite

15th
Jul 2015
Eysteinn Gunnlaugsson
@eysteinn13
Jul 15 2015 19:18
SELECT MONTH(shipping_date), count(p.po_ID), ROUND(AVG(final_price), 2), ROUND(AVG(TOTAL_WEEKDAYS(shipping_date, receiving_date)), 2), ROUND(SUM(p.final_price), 2), c.customer_name
FROM pos p, customer c
WHERE p.customer_ID = c.customer_ID
AND p.po_ID NOT IN (SELECT po_ID
FROM pos
WHERE shipping_date IS NULL)
GROUP BY YEAR(shipping_date), MONTH(shipping_date) DESC;
SELECT MONTH(shipping_date), count(p.po_ID), ROUND(AVG(final_price), 2), ROUND(AVG(TOTAL_WEEKDAYS(shipping_date, receiving_date)), 2), ROUND(SUM(p.final_price), 2), c.customer_name
FROM pos p, customer c
WHERE p.customer_ID = c.customer_ID 
AND p.po_ID NOT IN (SELECT po_ID
                               FROM pos
                             WHERE shipping_date IS NULL) 
GROUP BY YEAR(shipping_date), MONTH(shipping_date) DESC;
FOKK