Database query: Difference between two counts

5 pts.
Tags:
Database
Database query
Querying a db. I have two count queries that work. I want to subtract one from the other.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    You really need to clarify what you want to do and provide an example, or some sample code.

    If you really want to subtract one query from the other, then you would use the EXCEPT or MINUS set operator, but this subtract rows, not the contents of the rows.

    On the other hand, if you want to subtract the values returned by those queries, then that is a different thing.

    If that is the case, do they return a single value, or several?  If the latter, do you want to subtract the count from each group, or something else?

    Are they related (same tables, but different conditions) or totally independent?

    What database are you using?
    84,580 pointsBadges:
    report
  • ToddN2000
    We need some more details, if you can post your code so we get a better understanding of what you are trying to do. 
    126,110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: