Concatenate groups into a single sql statement
More about databases
More on databases