sql query i need to add the same range for the year before MAX$15
$10-30 USD
Completed
Posted over 2 years ago
$10-30 USD
Paid on delivery
i have this query that give me the data for this year i need to have last year data side with this year
begin
--This Year Sale - Daywise
SET @StartDate=DATEADD(yy, DATEDIFF(yy, 0, @OrderDate), 0)
SELECT fn.[DayName],[login to view URL],ROUND(ISNULL(SUM(oh.Total_Price),0),2) AS GrossSales, ROUND(ISNULL(SUM(oh.Grand_Total),0),2) AS NetSales
FROM fnGetListOfMonths(@StartDate,@OrderDate) fn
LEFT OUTER JOIN Invoice_Totals oh ON CAST([login to view URL] AS DATE) = [login to view URL] AND oh.Store_ID=@StoreID
GROUP BY [login to view URL],[login to view URL]
Hello, I would like to help you, I have more than 10 years of experience working with MYSQL, POSTGRESQL, SQL SERVER, MARIADB, in many of its versions. It is my specialty en SQL y PL/SQL. Visit my profile without obligation.
I've been working for a database designer for 5 years
I have been experienced realtional databases like mysql, oracle, mssql.
I am the one who came up with the idea of MongoDB the document oriented database.
I also have 3 years experience for data entry.
Stars doesn't express someone's ability.
Project result will show his/her worthy
Satisfy customer's requirements perfectly is my objective