The code in all of these functions seems virtually identical.  Seems like you should be able to refactor it to a single function that takes a handful of arguments; and potentially, you could define a constant at the top that would contain a map of all of the hard-coded queries and related data.  Then you could theoretically add more of them just by modifying the constant.

That last bit about the constants isn't absolutely mandatory, but refactoring these into a single function seems pretty important.