Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DROP TABLE IF EXISTS #Test CREATE TABLE #Test ( ID INT IDENTITY(1, 1) PRIMARY KEY , FruitName VARCHAR(100) , SalesAmount MONEY , TransactionDate DATETIME )

DROP TABLE IF EXISTS #Test CREATE TABLE #Test ( ID INT IDENTITY(1, 1) PRIMARY KEY , FruitName VARCHAR(100) , SalesAmount MONEY , TransactionDate DATETIME ) INSERT #Test VALUES ('Banana',10,'20220512') , (NULL,5,'20220401') , ('Orange',15,'20221211'), ('Apple',20,'20220312') SELECT t.FruitName AS [Fruit Name] , t.SalesAmount AS [Sales ] , SUM(t.SalesAmount) OVER () AS [Total] FROM #Test t WHERE t.FruitName NOT IN ('Apple',NULL)

Explain in detail and also add joins to the table of the left column

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Engineering Mathematics

Authors: Erwin Kreyszig

10th edition

470458364, 470458365, 978-0470458365

More Books

Students also viewed these Mathematics questions

Question

Describe Humes general approach to the problem of causality.

Answered: 1 week ago