Search code examples
sqlvisual-studioreporting-servicesssrs-2008

To show date on which highest total price is made in ssrs


enter image description hereI have a table with the TotalPrice column and BookedOn column which contains a date in which a particular order was placed. I want to generate a report in SSRS that will show the date on which the highest sales were made. There are several orders made on a particular date and I want to sum all the price and then compare in which date highest sales were made.


Solution

  • select top 1 CONVERT(date, BookedOn) Date, sum(TotalPrice) SumTotalPrice from your_table_name group by BookedOn order by SumTotalPrice desc

    I used convert because didn't know the format of your date column(whether it is datetime or date), you can use just date column otherwise