I have 3 tables, all tables contains date1, date2 and acctno, Some date1 and date2 in 3 tables are different and some are the same. Like the detail below. I want to get results date1, date2 and count(acctno).
date1tbl1 date2tbl1 date1tbl2 date2tbl2 date1tbl3 date2tbl3 A B C
20090126 20081222 1
20090128 20090126 1
20090126 20081222 1
20090108 20090106 1
20090105 20081229 20090105 20081229 11 2
20090105 20081230 20090105 20081230 47 5
20090107 20081230 2
20090107 20090105 1
20090126 20081229 20090126 20081229 20090126 20081229 7 2 2
20090126 20090123 20090126 20090123 20090126 20090123 12 7 9
20090127 20090126 20090127 20090126 10 14
A is count(acctno) from tbl1
B is count(acctno) from tbl2
C is count(acctno) from tbl3
I want to get result look like
date1 date2 A B C
20090126 20081222 1
20090128 20090126 1
20090126 20081222 1
20090108 20090106 1
20090105 20081229 11 2
20090105 20081230 47 5
20090107 20081230 2
20090107 20090105 1
20090126 20081229 7 2 2
20090126 20090123 12 7 9
20090127 20090126 10 14