SQL query for getting Count of distinct items along with Total
You need to be looking at GROUP BY and aggregate functions. See https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html for mysql's documentation.
In this case it looks like:

You want to be grouping by Item Name, you can just use the field directly in SELECT then as it is part of the grouping.
For Qty use the counting aggregate (COUNT(*)).
For Total Amount use SUM(Price).
Price could be a little more complicated. If the price for a given item is always the same (so something called Coffee is always 10) then either of the MIN() or MAX() aggregates will do, or you could include Price in the grouping (GROUP BY Item, Price) and not need any function. If the price of a named item can vary then you could use AVG(Price) to output the average, or you could chose to list each item+price combinations (so &quot;2x coffee at 10, total 20, and 1x coffee at 12, total 12&quot;).