fancy sql stubs