If this is not throw away code (to be replaced by the new SWM implementation), then we should convert it to fluent SQL since it is being touched (https://internal.wikia-inc.com/wiki/Fluent_SQL); please ignore otherwise.