SQL: SUM, AVG, but what about Division? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

SQL: SUM, AVG, but what about Division?

In SQL we have functions like SUM, AVG and SQRT But what about other mathematical equations like Division, Minues and Square?

19th Jun 2017, 10:18 PM
Limitless
Limitless - avatar
1 Answer
+ 4
you can use them in SELECT statements minus -, addition +, division /, and multiple * SELECT revenue , expenses , revenue - expenses AS "Profits" FROM t_budgets SELECT price , ship_cost , (price + ship_cost) * 1.07 AS "Total" FROM t_items this is SQL server at least...
20th Jun 2017, 2:25 AM
Scott Alfer
Scott Alfer - avatar