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

  • Home
  • SEARCH
  • 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 8102655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:17:57+00:00 2026-06-05T23:17:57+00:00

Background: There are multiple DBPArentProductKEys associated with a POG.ID. I need to count the

  • 0

Background: There are multiple DBPArentProductKEys associated with a POG.ID.

I need to count the number of Pog.DBKEYs that occurs. Right now the results count total POG.IDs in the total database for value4, but I want the count associated with the DBparentproductkey.

select distinct 
    Count(pog.DBKey) as Total,
    pos.DBParentProductKey 
from
    ix_spc_planogram as pog with (nolock), ix_spc_position as pos with (nolock), 
    ix_spc_product as pro with (nolock) 
where 
    pog.dbkey = pos.dbparentplanogramkey
    and pog.Value4 = 358 
group by 
    pog.DBKey, pos.DBParentProductKey
  • 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-05T23:18:00+00:00Added an answer on June 5, 2026 at 11:18 pm

    Take pog.DBKey out of the GROUP BY.

    Also, I think you are missing a join condition. You have no join condition against table pro.

    Finally, DISTINCT shouldn’t be needed.

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

Sidebar

Related Questions

Background The algorithm manipulates financial analytics. There are multiple lists of the same size
Background I have a TreeView that follows the MVVM design pattern and supports multiple
I'm using a UIImageView as a background-image and placed multiple UIButtons on it. Now
We've created a flow chart using Visio that has multiple layers. (The background is
Is there a way to apply multiple background on a same element with multiple
Is there a solution to have the background audio/music play across multiple page on
I am creating a program that will multiple background tasks simultaneously. I would like
First some background: VB.NET 2005 Application that accesses a MS-SQL back-end, using multiple Web
I've observed that often the websites use only one background image which contains multiple
When there are multiple of the following element they are shown right on top

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.