w3resource

SQLite Exercise: Calculate 171*214+625

Write a query to calculate 171*214+625.

SQLite Code :

-- Calculating the result of the expression 171 multiplied by 214, and then adding 625
SELECT 171 * 214 + 625 Result;

Output:

Result
----------------
37219

Explanation:

The above SQLite query calculates the result of the expression 171 multiplied by 214, and then adds 625 to that product. The final result is assigned the alias "Result".

Here's a brief explanation of each part of SQLite code:

  • SELECT clause:
    • It performs a mathematical calculation: 171 multiplied by 214.
    • It then adds the result of the multiplication to 625.
  • Result alias:
    • The result of the entire expression is aliased as "Result".

Go to:


PREV : Write a query to get the first 3 characters of first name from employees table.
NEXT : Write a query to get the names (for example Ellen Abel, Sundar Ande etc.) of all the employees from employees table.

Practice SQLite Online


Model Database

Employee Model  Database - w3resource online SQLite practice

Structure of 'hr' database :

hr database

Improve this sample solution and post your code through Disqus.

What is the difficulty level of this exercise?



Follow us on Facebook and Twitter for latest update.