(Multiple) Count distinct not returning counts
We have a problem with Oracle Database 12.1.0.2 regarding a query generated by a report system.
The following (simplified) query is executed (for sample table structure and data, see attachment):
SELECT
t2.guid AS data_group_id,
t2.name AS data_group_name,
COUNT(DISTINCT t1.data_internal) AS data_internal,
COUNT(DISTINCT t1.data_view) AS data_view
FROM (
SELECT
t.guid AS data_internal,
t.guid AS data_view,
t.type
FROM task t
WHERE t.guid IN (
SELECT guid FROM task WHERE assignee IN (HEXTORAW('f4243669d0bd461cb99ec3005d6ec795'), HEXTORAW('c5390aab903f4383b48589579e157b16'))