At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!
select extract(year from E.EENDDATE) as "Year", (extract(yearday from E.EENDDATE) - extract(weekday from E.EENDDATE-1) + 7) / 7 as "Week", sum(A.AMOUNTCHARGED) as "Value" from CCREVENTS E inner join CCRACC A on (E.CONTRACTNO = A.CONTRACTNO) group by extract(year from E.EENDDATE), (extract(yearday from E.EENDDATE) - extract(weekday from E.EENDDATE-1) + 7) / 7 -- it doesn't like this line having brackets and operators in it!
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.