Skip to content
Advertisement

SQL for Calclate sum of Sales At particular time every day

Order Table.Reprpesents Order Date and Created is time at which record was inserted

The laltest record in this table is at(Created value) – 05:17:38.710

Output – 2021-12-26 05:17:38.710

At this time on 26th i.e. today’s date the sales was

At the same time I want to know the sales on 25th

I want this kind of record for every day i.e. group by order date and at the max created time. So like at 5PM what was the sales every day

Advertisement

Answer

Try following code:

and for particular time:

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