Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
chollette
Starting Member
1 Post |
Posted - 2010-03-30 : 04:38:22
|
| i am new to database. i need help in solving the OLAP query syntax problem below;1. find the number of publication for different types of publication (journal, conference, book) for each faculty in the university, for the last five years.below is my solution but not sure is rightSELECT facultyNo,publicationType,yearmonth,COUNT(*) AS pubcountFROM faculty,publishedpapers,publicationlistWHERE faculty.facultyNo = publicationlist.facultyNo AND publishedpapers.publicationnNo = publicationtlist.publicationNoAND publishedpapers.publicationtype = ('journal','conference','book')AND publicationlist.yearmonth BETWEEN ('1-JAN-2005' AND '31-DEC-2009')GROUP BY ROLLUP(facultyNo,publicationtype,yearmonth,pubcount); |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-30 : 13:14:07
|
| post some sample data and explain what you want. thats much better than posting query------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|