Generate sql from hiccup and hiccup from datums