472,125 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

how to Mutiply different data type columns

8
Hi ,

I have the below tables

Table 1 with columns

id int
price char
quantity int
date date

In this table, same id has several entries at different date.

table 2 with columns

groupid int
groupname char


table 3 with columns

id int
groupid int


I want the result as

id
groupname
sum(quantity * price) for each id

Please help me in writing a query for this

Thanks in advance
Feb 29 '08 #1
1 1099
amitpatel66
2,367 Expert 2GB
Hi ,

I have the below tables

Table 1 with columns

id int
price char
quantity int
date date

In this table, same id has several entries at different date.

table 2 with columns

groupid int
groupname char


table 3 with columns

id int
groupid int


I want the result as

id
groupname
sum(quantity * price) for each id

Please help me in writing a query for this

Thanks in advance
Go ahead. Price will be internally converted to Integer and will get multiplied with Qty.
Feb 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Luis Esteban Valencia | last post: by
9 posts views Thread by Ben R. | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.