Let's keep track of all my 40 cats:
insert into MyPets values (1, "Fluffy", 8, "Brown", "")Change the age: update MyPets set petAge = 9 where petID = 1
insert into subList (values(2, "Timmy"), (3, "Fishy"), (4,"Catty"), (5,"Labrador"))
SELECT min(profit) as worst_deal from orders
SELECT segment, round(sum(profit)) as total_profit_segmentfrom ordersgroup by segment
That's all for today.
Order IDs: Unique vs Distinct:
Seriously, it does not support count(distinct ID)..?!
select [Sub-Category], round(sum(profit))from ordersgroup by [Sub-Category]order by sum(profit) desc
Better do something with those tables.
SELECT year(order_date),round(sum(profit))from orders…