Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Calculate Inventory Value | Numeric Functions
Functions in SQL

bookChallenge: Calculate Inventory Value

Tâche

Swipe to start coding

Write a query to calculate the total inventory value for all products in the products table. The total inventory value is defined as the sum of the product of price and stock for every product.

  • Use the products table.
  • Multiply the price by the stock for each product.
  • Calculate the sum of these values for all products.
  • Return the result as a single value with the column name total_inventory_value.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 6
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Calculate Inventory Value

Glissez pour afficher le menu

Tâche

Swipe to start coding

Write a query to calculate the total inventory value for all products in the products table. The total inventory value is defined as the sum of the product of price and stock for every product.

  • Use the products table.
  • Multiply the price by the stock for each product.
  • Calculate the sum of these values for all products.
  • Return the result as a single value with the column name total_inventory_value.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 6
single

single

some-alt