Task: Calculated Columns Practice
So far, we’ve learned how to create calculated columns using SQL. Now it’s time to practice and make sure this concept is completely clear. In this task, you’ll apply wha
So far, we’ve learned how to create calculated columns using SQL.
Now it’s time to practice and make sure this concept is completely clear.
In this task, you’ll apply what you’ve learned by working with a new table.
The Scenario
You are given a table called phones.
This table contains the following columns:
namemanufacturerpriceunits_sold
Each row represents a phone model and its sales information.
Your Goal
Your task is to write an SQL query that:
1. Selects the name of every phone 2. Calculates the total revenue for each phone 3. Renames the calculated column as revenue
How Is Revenue Calculated?
Revenue is calculated using this formula:
revenue = price × units_sold
This calculation should be done inside the SQL query, not manually.
Visualizing the Problem
You can think of the data like this:
name
manufacturer
price
units_sold
From this data, you want to generate a new calculated column:
| name | revenue |
Where:
revenue=price * units_sold
This calculated column does not exist in the table — it is created temporarily when you run the query.
What You Should Use
While writing your query, remember:

