Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7556015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:45:57+00:00 2026-05-30T11:45:57+00:00

How can I Select the Sum of the ProjectPossibilityRatio column from the ProjectCompletion table

  • 0

How can I Select the Sum of the ProjectPossibilityRatio column from the ProjectCompletion table given the ProjectID? I couldnt find sum:

SELECT pp.ProjectID,
   pp.ProjectAlias,
   Sum(pd.projectpossibilityratio)
FROM   project pp
   INNER JOIN projectcompletion pc
     ON pp.projectId = pc.projectID
   JOIN projectprocedure pd
     ON pd.projectprocedureID = pc.projectprocedureID
GROUP  BY pd.projectpossibilityratio

Here are the table definitions:

Create TABLE ProjectType(
ProjectTypeID int identity(1,1),
ProjectTypeName nvarchar(100),
Description nvarchar(200),
primary key(ProjectTypeID)
)


CREATE TABLE Project(
ProjectID int identity(1,1),
ProjectAlias nvarchar(100),
ProjectTypeID int foreign key references ProjectType(ProjectTypeID),
MandatedCompanyID int foreign key references Company(CompanyID),
Iscurrent bit,
BuySide bit,
TeamID int foreign key references WorkTeam(TeamID),
ProjectTurnOver varchar(100),
ProjectStartDate Datetime
primary key(ProjectID))



CREATE TABLE ProjectProcedure(
ProjectProcedureID int identity(1,1),
ProjectProcedureName nvarchar(100),
ProjectProcedureDescription nvarchar(200),
ProjectType int foreign key references ProjectType(ProjectTypeID),
ProjectProcedurePosition int,
ProjectProcedureTime smallint,
ProjectPossibilityRatio int,
Primary Key(ProjectProcedureID))

CREATE TABLE ProjectCompletion(
ProjectID int foreign key references Project(ProjectID),
ProjectProcedureID int foreign key references ProjectProcedure(ProjectProcedureID),
StartDate Datetime,
IsCompletedDate Datetime
Primary Key(ProjectID,ProjectProcedureID)
)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:45:58+00:00Added an answer on May 30, 2026 at 11:45 am

    Try this:

      SELECT pp.ProjectID,pp.ProjectAlias,Sum(pd.projectpossibilityratio)
        FROM project pp INNER JOIN projectcompletion pc ON pp.projectId=pc.projectID 
        JOIN projectprocedure pd ON pd.projectprocedureID=pc.projectprocedureID 
        GROUP BY pp.ProjectID,pp.ProjectAlias
    

    And I agree with LeftyX, you should go back and accept answers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several tables with the same structure. How can I select SUM(field) from
I display the following from the job history table SELECT sum(run_duration) as [RUN_DURATION], sysjobhistory.step_id,
How can i write this sql in jpql syntax? SELECT SUM(t1.preise) FROM ( SELECT
In my SQLite database manager I can query this: SELECT SUM(odometer) as odometer FROM
My code like this ResultSet rs = statement.executeQuery( SELECT SUM(column1) FROM table where column2=name
Can you pass variables into subqueries, like so? SELECT users.id AS id, (SELECT SUM(total)
Can i apply SUM() within an ISNULL() .... Consider my following sql server select
In Photoshop you can select Color (the second from the bottom) to set the
In my app,user can select image from gallery and after that he can zoom
How can i use the END_DATE/START_DATE from the first sub select in the second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.