出現了Oracle數據庫的情況下,我想創建兩個表具有相同的列的報告 表A
包括id, code, name
和表B
包括id, code, name
太 現在我想創建一個報告,計數和組數據都表給出結果如下:聚合相同的記錄
Id1, code1, name1, count (the occurrence of this combination in both tables)
Id2, code2, name2, count (the occurrence of this combination in both tables)
我怎麼能achiev e使用查詢得到上述結果?重要的事實是有時某個表中可能找不到特定的項目,因此總計數將是在另一個表中找到的計數。可能的結果將是
idn, coden, namen, count of occurrence which found in one of the tables