Challenge: Calculate Inventory Value
Oppgave
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.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 6
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Fantastisk!
Completion rate forbedret til 2.86
Challenge: Calculate Inventory Value
Sveip for å vise menyen
Oppgave
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.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 6
single