-
Nee help with SQL
Hi I got one table named FMW_analy, It has a customer, Consultants(SC), Hours, OPPT_ID,Value, and other columns
this table got multiple entries of same oppt_id because more than one Consultant work on one opportunity and there is multiple entries of hours they worked on,
these hours are entered multiple time because when ever they work they enter these as new entry.
I want to query the number of consultants worked on an opportunity and their total hours and value can I do this with SQL query I tried some query but I'm noway near it. The result I'm looking for some thing like
Opptyrnity Number of SC total hours
Qqntqs 5 120
Thank you Vicky
-
Try this
select oppt_id, count(distinct sc), sum(hours)
from fmw_analy
group by oppt_id
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|