update custom SQL to be compatible with Postgres
update custom SQL to be compatible with Postgres

natea/Miro-Community,pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity,natea/Miro-Community,pculture/mirocommunity