Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8372

Re: Distinct count on two columns

$
0
0

This the raw (distinct) data - employee code and course date. I have inserted a break on the employee code, so that employees who attended more than training session could be seen.

DevDay YTD employee-courses.png

But I only need to count all distinct employees and sessions, not display them. Get this total number for my selection as in the first post - 144.

 

In raw SQL I would use

 

SELECT COUNT(*)

FROM (SELECT DISTINCT emp_code, course_date

      FROM MY_TABLES) AS internal_query

 

I need to achieve the same with BO. Is it possible?


Viewing all articles
Browse latest Browse all 8372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>