There is an item on things 2 remember. Last item on developing SQL.
http://www.infiniteinfo.com/openacs/things2remember.html
This thread maybe helpful too:
https://openacs.org/forums/message-view?message_id=32269
Happy Holidays!