11

I feel my question Minimizing the number of parent rows for a distinct column in a child table may be too simple for dba. I know it is likely some simple group by logic that I am missing but I feel this is a little more complex than "join two tables together" so I am unsure of what to do. Should I remove my question and re-ask it on SO?

1
  • 1
    No, it's not basic at all. I spent 3 mins to read through your code and understand what it is trying to do. Basic would mean less than 1 minute :) Commented May 8, 2012 at 16:23

2 Answers 2

8

I think this is a good question for DBA. Mostly the "too basic" label would apply to simple operators. The most common example I can think of is a few times a week someone asks a variation on conditional counts that are trivially solved with a SUM(CASE WHEN....

Your question is fairly complicated and specific - it's not likely someone who knows a little SQL from working on PHP will be able to resolve it for you.

That being said, you could probably have posted it on SO, but I don't think you would be likely to get any feedback. I think DBA is the right place for it.

5

In my experience, many seemingly expert programmers struggle to understand set theory and how to use SQL to generate the sets of data they need.

DBA should be a place where this theory and practice can be learned by (good) example.

1
  • +1 this is so true - procedural and set-based are two quite different mindsets
    – Jack Douglas Mod
    Commented Jul 29, 2012 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .