"select" and "having" clauses in SQLiss

3 views
Skip to first unread message

Gaspard Bucher

unread,
May 10, 2011, 4:36:24 AM5/10/11
to zena
Hi there !

It seems I cannot finish the 1.0 transition without adding new features all the time. Anyway, here is an interesting one that lets you use the full power of Zena's indexing capabilities:

"select" and "having" in SQLiss.

These let you do things like this:

recipients
from invoices
  select amount.sum as tot_amount
  where date.year = #{params[:year]}
  in site
group by id
having tot_amount > 10000

In case it is not obvious (), this query fetches the customers who were invoiced more then 10000 in a given year.

To get a better feeling of the thing, you can read the blog post: http://zenadmin.org/801

And by the way, I changed Zena's moto from "web 2.0 goodness" to "the most powerful Ruby on Rails CMS"
because this is what it is.

Ha ! ha !

Gaspard
343.gif
Reply all
Reply to author
Forward
0 new messages