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 8403833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:26:42+00:00 2026-06-09T22:26:42+00:00

I am trying for a select statement in SQL Server 2005. I have columns

  • 0

I am trying for a select statement in SQL Server 2005. I have columns “IsConfirmed” and “Amount”.
My aim is to get Sum of all Amounts for each day along with a boolean value which should be calculated. If there is 0 as IsConfirmed, get the value of Isconfirmed for that day as 0 or if all records on that day are 1, give me 1. Is there a way for this kind of a solution in sql. Thank you in Advance..

Select sum(Amount) from RepAmount
where ComID = 1234
group by RD.Date
  • 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-06-09T22:26:43+00:00Added an answer on June 9, 2026 at 10:26 pm
    Select 
       sum(Amount),
       CASE WHEN SUM(CAST(IsConfirmed As int)) = COUNT(*) THEN
         1
       ELSE
         0
       END As IsConfirmed
    from RepAmount
    where ComID = 1234
    group by RD.Date
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On SQL server 2005 I am trying to query this select statement SELECT AlarmEventTransactionTableTable.TxnID,
I'm trying to make the following SQL server statement to work, but I get
I am trying to use the WITH statement in SQL Server 2005. It seems
I'm trying to do the below sql statement in GORM select * from table1
I'm trying to debug a SQL statement generated with sqlite3 python module... c.execute(SELECT *
I am trying to have a running average column in the SELECT statement based
I have a Stored proc which returns 6 select statement results. I'm trying to
I'm using SQL Server 2005 and I'm trying to achieve something like this: I
I'm using C# with TSQL and SQL Server 2005 I'm trying to use PetaPoco
I am using VS2005 and SQL Server 2005. I am trying to execute multiple

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.