Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 695 of 2,288    |
|    VC to All    |
|    Re: Sql select question    |
|    19 Nov 03 23:33:54    |
      From: boston103@hotmail.com              Hello andy,              Given:              create table t1(ex_inv_ref int, account int);              the simplest way to do what you want is:              select a.ex_inv_ref, count_6040, count_1512 from        (select ex_inv_ref, count(*) count_6040 from t1 where account=6040 group       by ex_inv_ref) a,        (select ex_inv_ref, count(*) count_1512 from t1 where account=1512 group       by ex_inv_ref) b       where a.ex_inv_ref=b.ex_inv_ref and count_6040 != count_1512;              Rgds.                     "andy vandenberghe" |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca