Assume I have a database. Maintable (matchNo integer, year INTEGER, month INTEGER)
I have to find the count of distinct year, month combinations in which matches were played. I tried the query select COUNT (DISTINCT column1, column2) from table but this gives an error. I would like to know is there a simple query by which one can figure out this. Assume you have a following data: matchNo, year, month 34 2007 9 27 2006 5 26 2006 5 Now distinct year, month will return 2007, 9 2006, 5 Is there a way by which I can count (distinct year, month) combinations? For this example answer should be 2. Regards, Phani