CS1103/Labs/Lab5/Q7.sql
2022-10-07 00:48:09 -03:00

9 lines
255 B
SQL

select SUM(LINE_NUM) as `Number of Products purchased`, BRAND_TYPE as `Brand`
from LGCUSTOMER
natural join LGINVOICE
natural join LGLINE
natural join LGPRODUCT
natural join LGBRAND
where
CUST_STATE = "ME"
group by BRAND_TYPE;