var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Select count statement - urgent plzzzz
I am trying to count the occurences of certain data according to their dates.
let's say the table is like
Date1 Date2 colour country
02/05/08 04/05/08 blue UK
I would like to get from this table the number of occurences of date1=sysdate -1 and a another colum with occurences of date2=sysdate-1 and a 3rd column where date1=sysdate-1 and date2=sysdate-1.
so output would be something like
Date1 Date2 date1anddate2
5 10 3
I hope i have been clear.
Many thanks for your help.
Something like this Scott's schema example?
SQL> select t1.cnt, t2.cnt
2 from (select count(*) cnt
3 from emp
4 where to_char(hiredate, 'yyyy') = '1981'
5 ) t1,
6 (select count(*) cnt
7 from emp
8 where to_char(hiredate, 'yyyy') = '1982'
9 ) t2;
Thats exactly what I wanted!