Builds the address block using SQL