SQL, multiply two columns in the same row and create a "total" column -


enter image description here

that trying achieve, have except total column. total column result of number * product price. have tried several sum() queries, none coming out way want , finding difficult making new column in process. appreciated, thanks.

you should able append query so:

select transactionid,        customerid,        storeid,        transactiondate,        number,        productname,        productprice,        number*productprice total dbo.table 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -