Postgres Check If String Has Substring In Mysql Query Between Dates