Home > SQL > Case statement with sum function in SQL



Case statement with sum function in SQL

In this article, we will explain how to use case statement with a sum function in SQL


In this article, we will explain how to use case statement with a sum function in SQL

In this example, We have created a table of stock buy and sell. and added some of stock record in table .We are using case statement for sum of qty based on buy and sell.

 

SQL

We have explained a create table statement after performing that statement, we have shared the output below.

Screenshot

 

Case Statement With Sum Function in SQL

 




Note: All contents are copyright of their authors.



Comments



Leave a Reply

Comment:*
Email ID:*


Name:*