Challenge: Calculate Inventory Value
Tarefa
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
productstable. - Multiply the
priceby thestockfor 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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 6
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Incrível!
Completion taxa melhorada para 2.86
Challenge: Calculate Inventory Value
Deslize para mostrar o menu
Tarefa
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
productstable. - Multiply the
priceby thestockfor 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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 6
single