How to calculate Subtraction in sql

Hi everyone 

I am not SQL expert, Let me ask some question.

I have 3 count value (eg count_A, count_B and count_C)

I want to calculate the value of D.

Is it possible to calculate D = count_A - count_B - count_C in sql.

( in sql maybe count_A - count_B - count_C as D)

How can I achieve this .Please help me .

Thanks

Hi May,

You can use select statement first to fetch the data and then subtract it and fetch your other data. This link might help.

https://stackoverflow.com/questions/6715095/how-to-sum-and-subtract-using-sql

Thanks

Divyanshu

Hi,


SQL Arithmetic Operators works similarly with Advanced SQL widget,


1. Create a specific OutPut structure to get output from advanced SQL.

2. Use advanced SQL widget and write a query accordingly with the help of below link

https://www.w3resource.com/sql/arithmetic-operators/sql-arithmetic-operators.php


Please let us know.


Thanks