SQL query:
SELECT (Iif(a.InfoValue <>'','[url='+a.InfoValue+']','')+Iif(p.OriginalTitle<>'', p.OriginalTitle, p.Title) + Iif(p.ProdYear<>0, " ("+trim(str(p.ProdYear))+")", "")+Iif(a.InfoValue<>'','[/url]','')) AS [Title], Month(e.EventTimeStamp) as [Month], DAY(e.EventTimeStamp) as [Watched on], "[mr]"+ i.InfoValue + "[/mr]" AS [Rating] FROM ((Profiles p INNER JOIN Events e ON e.ProfileID=p.ProfileID) LEFT OUTER JOIN AdditionalInfo i ON (i.ProfileID =p.ProfileID and i.InfoName="MyRating")) Left OUTER JOIN AdditionalInfo a ON (a.ProfileID=p.ProfileID and a.InfoName="Review") WHERE e.EventType='Watched' AND e.UserID='Thomas' AND YEAR(e.EventTimeStamp)=2009 ORDER BY e.EventTimeStamp ASC, p.SortTitle;
Notes see above.
Hint:
In CCViewer, if you right-click on the result table of the SQL query, you can copy the result to the clipboard. You are asked to enter how the columns should be divided. If you enter "bbcode", a table which can be used in the forum is generated.