Search results

  1. T

    Sql Joins issue

    Thank you Minty. The Sql is counting the total number of learners on all courses ( a monthly check to see how many enrolments in total and how many courses we have), the enrolments are fine but the course count only totals the number of courses with enrolments, I need it to include the courses...
  2. T

    Sql Joins issue

    Hi I am running a query from the tables below and as well as needing to count all the 'pu.Unit_Instance_codes' (enrolments) I need to count the distinct 'UNIT_INSTANCES' (courses) but no matter what joins I use I am only getting the number of 'UNIT_INSTANCES' (courses) where there are enrolments...
  3. T

    Count distinct

    HI I tried this but I have a Incorrect syntax near ')' on the first sum line which I cannot figure out
  4. T

    Count distinct

    Thank you for helping. when I use this code answers count the number of enrolments, not the number of unique learners.
  5. T

    Count distinct

    Thank you ! I tweaked yours a little and my totals are correct. SELECT count(distinct p.PERSON_CODE) Learners ,p.Sex Gender ,IIf(p.Primary_Disability = 91, 'With_Disability', IIf(p.Primary_Disability = 98,'No_Disibality', 'Other')) As Category Perfect answers I am just wondering...
  6. T

    Count distinct

    HI I am baffled and have tries all ways to count Distinct information. My database records learners and enrolments, and I need to count the unique number of learners for different categories, such as gender and Disability but SQL results are counting the number of enrolments. In this SQL the...
Back
Top Bottom