w3resource
SQL exercises

SQL: Display the result of an arithmetic simplification

SQL Basic Select Statement : Exercise-5 with Solution.

Write a query to display the result of an arithmetic simplification.

Sample Solution :

SELECT 10 + 15 - 5 * 2;

Output of the Query:

?column?
15

Explanation :

Syntax of display the result of an arithmetic simplification

Pictorial presentation :

Result of an arithmetic simplification

Query Visualization:

Duration:

Query visualization of Display the result of an arithmetic simplification - Duration

Rows:

Query visualization of Display the result of an arithmetic simplification - Rows

Cost:

Query visualization of Display the result of an arithmetic simplification - Cost

 

Practice Online


Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query to display sum of two numbers 10 and 15.
Next: Write a query to display only name and commission from table salesman.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming