我正在尝试计算以下示例代码中COUNT DISTINCT
的{{1}},因此我要查找的结果是ids
。
3
这是我正在尝试做的更复杂的例子,可能有助于理解我的问题:
CREATE TYPE tab AS TABLE OF NUMBER(9);
SELECT COUNT( DISTINCT ids.COLUMN_VALUE ) FROM ( -- pseudo-code, obviously not working
SELECT tab(1,2) AS ids FROM dual UNION ALL
SELECT tab(2,3) AS ids FROM dual
);