Skip to content
Advertisement

SQL request in which the data of one field as a result is grouped in different columns

An example of a table of orders

Is it possible to get the amount of orders grouped by dates without the use of subqueries, while separately the pickup amount and delivery amount?

I’m not sure that it is possible

Advertisement

Answer

you can wrap you condition into aggregation

for mysql syntax it can be as follows:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement