• For example, I have a sales detailed table, containing barcodes and its quantity that are sold for the day. What If I want to query the number of items of each barcode that was sold out for the day, so my query would look like this:

    SELECT outlet, sales_date, barcode, count(qty) as Quanity

    FROM sales

    Can i still use your example?