Add custom sql query doco

#290