Add SQL-like query functions
Change WHERE function into a macro