How to solve this question of SQL

Peter Tran shared this question 5 years ago

Create a calculated field based on (quantity * item_price) from the orderitems table. Name all columns.

Using (8) above, add the $ sign appropriately into the output.

Files: view.htm

Replies (1)


Hi Peter,

to create a calculated field with SQL you must first set the Formula Type to be "Freehand SQL":


and then enter the formula "quantity * item_price" (you do not to enter the full SQL query, only the columns between the SELECT and the FROM)

Then once you have saved your Freehand SQL Calculated field, drag it across into your report and then select "Format" for the calc field column and then select "Edit"


and finally add the $ sign to the field called "Prefix":


Hopefully that will help you meet your reporting requirements!



Leave a Comment
Attach a file