AnsweredAssumed Answered

eSQL query - results doubled

Question asked by davehob on Mar 18, 2015
Latest reply on Mar 19, 2015 by davehob

(I originally added this to an older thread, but it is really a new question, so here it is...)

 

Just when I thought I'd got the hang of this eSQL thing ...  I now have a new problem with a join query, which I've really tried to figure out, but to no avail.

 

The relationships are between Sessions (SSN), Programmes (PGM), and Programme Titles (PTI) - i.e. SSN -> PGM -> PTI.

 

For a group of Sessions, I want to show the number of Sessions for each Programme Title.

 

Here's the eSQL that I've come up with, based on advice from people here.  (And I'm sorry, Beverly, I haven't renamed my primary keys, yet...).

 

It works, "kind of".  The problem with it is that the result is doubling the number of Sessions within each Programme Title - in the example below, the results should be Crusoe Club 4, Forget-Me-Not 3, Sunday Club 3, etc.

 

Any idea what I'm doing wrong?

 

Thanks,

 

Dave.

 

data_viewer.jpg

Outcomes