SmiData Example
This example shows you to perform a custom sql query on the Smi database. The sql statement is executed on the database of the Smi site with the name 'mysite'.
| Smartsite SXML |
|
|---|---|
<se:smidata
sitename="mysite"
sql="select top 10 c.Nr, c.Title, sum(ppd.Total) as Pageviews from contents c
inner join Page p on p.SmartsiteId=c.Nr
inner join PageviewsPerDay ppd on p.Nr=ppd.PageId and ppd.LogDate >= '2010/10/01' and ppd.LogDate {char.lt()}= '2010/10/31'
where c.ContentType='FAQ'
group by c.Nr, c.Title
order by Pageviews desc"
save="data"
resulttype="datatable"
/>
{datatable.simpleformat($data)}
|
|